Font size
WorksheetsGitHub for Web Development Quiz
Total questions: 52
Worksheet time: 3hrs 36mins
What is GitHub primarily used for?
Managing databases
Hosting and collaborating on code projects
Creating websites
Storing images
Which version control system does GitHub work with?
SVN
Perforce
Mercurial
Git
What is the main difference between Git and GitHub?
Git is a local tool for version control
GitHub is a local tool
Git is a cloud platform
GitHub is a command line tool
What command initializes a Git repository?
git init
git new
git start
git create
What does the command 'git status' do?
Pushes changes to GitHub
Commits changes
Checks changes in files
Checks for updates
What is the purpose of the Staging Area in Git?
To delete files
To prepare files to be committed
To track changes
To store final versions of files
Which command is used to save changes in Git?
git save
git commit
git push
git add
What is the first step to create a new repository on GitHub?
Initialize a local repository
Clone an existing repository
Create a new branch
Log in to GitHub
What does 'git push' do?
Commits changes locally
Pulls changes from GitHub
Sends changes to GitHub
Creates a new branch
What command is used to clone a repository?
git copy
git clone
git download
git fetch
What is the purpose of the command 'git pull'?
To create a new repository
To send changes to GitHub
To get the latest changes from GitHub
To delete a repository
What should you do if there is already a logged-in user in Git Bash?
Change the repository URL
Reinstall Git
Log out and log back in
Delete the repository
What command is used to stage all changes in Git?
git push .
git commit .
git add .
git stage .
What is the purpose of the command 'git remote add'?
To fetch changes from a remote repository
To link a local repository to a remote one
To delete a remote repository
To add a new branch
What does the command 'git branch -M main' do?
Creates a new branch
Renames the current branch to main
Deletes the main branch
Switches to the main branch
What is the optional step when creating a new repository on GitHub?
Adding a README
Choosing a license
Setting up branches
Inviting collaborators
What is the correct URL format to set the remote origin?
git@github.com:username/repo.git
https://repo.git/username
https://username@github.com/repo.git
https://github.com/username/repo.git
What is the purpose of initializing a repository with 'git init'?
To clone a repository
To create a new branch
To start tracking changes
To push changes to GitHub
What does the command 'git add filename' do?
Stages the file for commit
Commits the file
Deletes the file
Pushes the file to GitHub
What is the significance of a README file in a GitHub repository?
It is used for collaboration
It provides information about the project
It tracks changes
It contains the code
What command would you use to check the version of Git installed?
git version
git --version
git check
git info
What is the main function of Git?
To create websites
To track changes in files
To host code
To manage databases
What is the first step in setting up Git and GitHub?
Create a new branch
Install Git
Create a GitHub account
Clone a repository
What does 'git config user.name' do?
Sets the username for commits
Changes the repository name
Links to a remote repository
Creates a new user
What is the purpose of the command 'git commit -m "message"'?
To stage changes
To save changes with a message
To push changes to GitHub
To initialize a repository
What is the difference between public and private repositories on GitHub?
Public is free, private is paid
Public is for collaboration, private is for personal use
Public can be seen by anyone, private is restricted
There is no difference
What does the command 'git push -u origin main' do?
Creates a new branch
Deletes the main branch
Pushes changes to the main branch
Pulls changes from the main branch
What is the main advantage of using GitHub over Git?
No need for internet
Faster performance
Local storage
Online collaboration
What is the purpose of the command 'git clone'?
To copy an existing repository
To create a new repository
To delete a repository
To push changes
How do you supply a commit message to a commit?
Git message "I'm coding!"
Git commit -m "I'm coding!"
Git commit "I'm coding!"
Git add "I'm coding!"
Which is the correct order to submit your changes from the working directory all the way to the remote repository?
Git add, git commit, git push
Git push, git add, git commit
Git add, git push, git commit
Git commit, git add, git push
It is a good habit to PULL first to check for changes before PUSH.
True
False
Git is a helpful tool in software development projects.
True
False
Git is a free and open source distributed version control system
True
False
Which of the following is NOT a benefit of using a version control system (VCS)?
Documenting changes
Having errors automatically pointed out
Automatically creating a backup of your work
Keeping file names and hierarchies consistent and organized
We can check the current state of the files in a Git repository with the command “git status.”
True
False
The correct way to connect a local repository to a remote repository is
git remote add origin [URL]
True
False
This is a text interface for the computer's operating system, accessed via the terminal.
Command Line
File System
Root Directory
Git
What is Git used for?
Which of the following propositions are NOT true about Git?
(multiple choices allowed)
It can help me to be more efficient
It prevents bugs and regressions in the codebase
It helps me to work with my colleagues
It allows to get back to a previous state of the codebase
What does a pull request do in GitHub?
A pull request allows developers to propose changes, review code, and merge updates in a collaborative manner.
A pull request automatically merges changes without review.
A pull request is used to delete files from a repository.
A pull request is a way to create a new branch in GitHub.
What is the command to commit with the message "New email":
git commit -m "New email"
git commit -log "New email"
git commit -mess "New email"
git commit message "New email"
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?
git add git-quiz.html
git status
git add .
git commit -m "git quiz web file added"
After you install Git and prior to issuing the first commit, which two configuration properties does the tool expect to be configured?
username and email address
username and password
email address and password
username and IP address
Which option should you use to set the default user name for every repository on your computer?
--global
No need to specify
--all
--A
Which of these terms best describes git?
Integrated development environment
Distributed Version control system
Issue tracking system
Web-based repository hosting service
The git help command is used to.
Show a list of the most used commands in Git
Displays a list of network information.
Help the user to commit his code
Show a list with the ips
How would you commit this with the message "adding new authors to index"?
git commit -m "adding new authors to index"
git commit "adding new authors to index"
git commit .
Both a) and b)
Command to push your code from local system to GitHub
git push -u origin <branch_name>
git push <branch_name>
~push <branch>
~git push origin <branch>
What is the basic workflow in Git?
Open, copy, paste, save as
Clone, make changes, add, commit, push
Download, edit, delete, save
Create, move, rename, delete
What is the purpose of a remote repository in GitHub?
Store and manage project versions collaboratively
Share memes with other users
Organize networking events for developers
Create a local backup of the project
