wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

GitHub for Web Development Quiz

Total questions: 52

Worksheet time: 3hrs 36mins

Name
Class
Date
1.

What is GitHub primarily used for?

a)

Managing databases

b)

Hosting and collaborating on code projects

c)

Creating websites

d)

Storing images

2.

Which version control system does GitHub work with?

a)

SVN

b)

Perforce

c)

Mercurial

d)

Git

3.

What is the main difference between Git and GitHub?

a)

Git is a local tool for version control

b)

GitHub is a local tool

c)

Git is a cloud platform

d)

GitHub is a command line tool

4.

What command initializes a Git repository?

a)

git init

b)

git new

c)

git start

d)

git create

5.

What does the command 'git status' do?

a)

Pushes changes to GitHub

b)

Commits changes

c)

Checks changes in files

d)

Checks for updates

6.

What is the purpose of the Staging Area in Git?

a)

To delete files

b)

To prepare files to be committed

c)

To track changes

d)

To store final versions of files

7.

Which command is used to save changes in Git?

a)

git save

b)

git commit

c)

git push

d)

git add

8.

What is the first step to create a new repository on GitHub?

a)

Initialize a local repository

b)

Clone an existing repository

c)

Create a new branch

d)

Log in to GitHub

9.

What does 'git push' do?

a)

Commits changes locally

b)

Pulls changes from GitHub

c)

Sends changes to GitHub

d)

Creates a new branch

10.

What command is used to clone a repository?

a)

git copy

b)

git clone

c)

git download

d)

git fetch

11.

What is the purpose of the command 'git pull'?

a)

To create a new repository

b)

To send changes to GitHub

c)

To get the latest changes from GitHub

d)

To delete a repository

12.

What should you do if there is already a logged-in user in Git Bash?

a)

Change the repository URL

b)

Reinstall Git

c)

Log out and log back in

d)

Delete the repository

13.

What command is used to stage all changes in Git?

a)

git push .

b)

git commit .

c)

git add .

d)

git stage .

14.

What is the purpose of the command 'git remote add'?

a)

To fetch changes from a remote repository

b)

To link a local repository to a remote one

c)

To delete a remote repository

d)

To add a new branch

15.

What does the command 'git branch -M main' do?

a)

Creates a new branch

b)

Renames the current branch to main

c)

Deletes the main branch

d)

Switches to the main branch

16.

What is the optional step when creating a new repository on GitHub?

a)

Adding a README

b)

Choosing a license

c)

Setting up branches

d)

Inviting collaborators

17.

What is the correct URL format to set the remote origin?

a)

git@github.com:username/repo.git

b)

https://repo.git/username

c)

https://username@github.com/repo.git

d)

https://github.com/username/repo.git

18.

What is the purpose of initializing a repository with 'git init'?

a)

To clone a repository

b)

To create a new branch

c)

To start tracking changes

d)

To push changes to GitHub

19.

What does the command 'git add filename' do?

a)

Stages the file for commit

b)

Commits the file

c)

Deletes the file

d)

Pushes the file to GitHub

20.

What is the significance of a README file in a GitHub repository?

a)

It is used for collaboration

b)

It provides information about the project

c)

It tracks changes

d)

It contains the code

21.

What command would you use to check the version of Git installed?

a)

git version

b)

git --version

c)

git check

d)

git info

22.

What is the main function of Git?

a)

To create websites

b)

To track changes in files

c)

To host code

d)

To manage databases

23.

What is the first step in setting up Git and GitHub?

a)

Create a new branch

b)

Install Git

c)

Create a GitHub account

d)

Clone a repository

24.

What does 'git config user.name' do?

a)

Sets the username for commits

b)

Changes the repository name

c)

Links to a remote repository

d)

Creates a new user

25.

What is the purpose of the command 'git commit -m "message"'?

a)

To stage changes

b)

To save changes with a message

c)

To push changes to GitHub

d)

To initialize a repository

26.

What is the difference between public and private repositories on GitHub?

a)

Public is free, private is paid

b)

Public is for collaboration, private is for personal use

c)

Public can be seen by anyone, private is restricted

d)

There is no difference

27.

What does the command 'git push -u origin main' do?

a)

Creates a new branch

b)

Deletes the main branch

c)

Pushes changes to the main branch

d)

Pulls changes from the main branch

28.

What is the main advantage of using GitHub over Git?

a)

No need for internet

b)

Faster performance

c)

Local storage

d)

Online collaboration

29.

What is the purpose of the command 'git clone'?

a)

To copy an existing repository

b)

To create a new repository

c)

To delete a repository

d)

To push changes

30.

How do you supply a commit message to a commit?

a)


Git message "I'm coding!"

b)


Git commit -m "I'm coding!"

c)


Git commit "I'm coding!"

d)

Git add "I'm coding!"

31.

Which is the correct order to submit your changes from the working directory all the way to the remote repository?

a)

Git add, git commit, git push

b)

Git push, git add, git commit

c)

Git add, git push, git commit

d)

Git commit, git add, git push

32.

It is a good habit to PULL first to check for changes before PUSH.

a)

True

b)

False

33.

Git is a helpful tool in software development projects.

a)

True

b)

False

34.

Git is a free and open source distributed version control system

a)

True

b)

False

35.

Which of the following is NOT a benefit of using a version control system (VCS)?

a)

Documenting changes

b)

Having errors automatically pointed out

c)

Automatically creating a backup of your work

d)

Keeping file names and hierarchies consistent and organized

36.

We can check the current state of the files in a Git repository with the command “git status.”

a)

True

b)

False

37.

The correct way to connect a local repository to a remote repository is

git remote add origin [URL]

a)

True

b)

False

38.

This is a text interface for the computer's operating system, accessed via the terminal.

a)

Command Line

b)

File System

c)

Root Directory

d)

Git

39.

What is Git used for?

a)
Version control and collaboration in software development
b)
Cooking recipes
c)
Creating music playlists
40.
Which of the following git command that downloads your repository from GitHub to your computer?
a)
git clone
b)
git commit
c)
git fork
d)
git push
41.

Which of the following propositions are NOT true about Git?

(multiple choices allowed)

a)

It can help me to be more efficient

b)

It prevents bugs and regressions in the codebase

c)

It helps me to work with my colleagues

d)

It allows to get back to a previous state of the codebase

42.

What does a pull request do in GitHub?

a)

A pull request allows developers to propose changes, review code, and merge updates in a collaborative manner.

b)

A pull request automatically merges changes without review.

c)

A pull request is used to delete files from a repository.

d)

A pull request is a way to create a new branch in GitHub.

43.

What is the command to commit with the message "New email":

a)

git commit -m "New email"

b)

git commit -log "New email"

c)

git commit -mess "New email"

d)

git commit message "New email"

44.

After you initialize a new Git repository and create a file named git-quiz.html, which of the following commands will not work if issued?

a)

git add git-quiz.html

b)

git status

c)

git add .

d)

git commit -m "git quiz web file added"

45.

After you install Git and prior to issuing the first commit, which two configuration properties does the tool expect to be configured?

a)

username and email address

b)

username and password

c)

email address and password

d)

username and IP address

46.

Which option should you use to set the default user name for every repository on your computer?

a)

--global

b)

No need to specify

c)

--all

d)

--A

47.

Which of these terms best describes git?

a)

Integrated development environment

b)

Distributed Version control system

c)

Issue tracking system

d)

Web-based repository hosting service

48.

The git help command is used to.

a)

Show a list of the most used commands in Git

b)

Displays a list of network information.

c)

Help the user to commit his code

d)

Show a list with the ips

49.

 How would you commit this with the message "adding new authors to index"?

a)

git commit -m "adding new authors to index"

b)

git commit "adding new authors to index"

c)

 

git commit .

d)

 

Both a) and b)

50.

 Command to push your code from local system to GitHub

a)

git push -u origin <branch_name>

b)

git push <branch_name>

c)

~push <branch>

d)

~git push origin <branch>

51.

What is the basic workflow in Git?

a)

Open, copy, paste, save as

b)

Clone, make changes, add, commit, push

c)

Download, edit, delete, save

d)

Create, move, rename, delete

52.

What is the purpose of a remote repository in GitHub?

a)

Store and manage project versions collaboratively

b)

Share memes with other users

c)

Organize networking events for developers

d)

Create a local backup of the project