NEW
Font size
WorksheetsGit and Github Quiz
Total questions: 15
Worksheet time: 5mins
What is the main purpose of using Git?
Running code faster
Version control & tracking changes
Hosting websites
Designing UI
Which command sets global Git username?
`git init` converts a folder into:
A GitHub repository
A local Git repository
A cloud backup
A compressed zip file
What must be done before a file can be committed?
Rename the file
Push the file
Stage the file
Delete the file
The command `git add .` does what?
Deletes all files
Stages all modified files
Stages only a specific file
Pushes all files
Which command links local repo to GitHub?
git add origin
git remote add origin
git upload origin
git merge origin
Which command is used to clone a remote repo?
git copy
git clone
git download repo
git fetch clone
What is a branch in Git?
A duplicate repository
A separate line of development
A backup of Git logs
A pull request
A 'fork' in GitHub refers to:
Cloning a repository into your account
Deleting a repo
Creating a new branch
Editing code online
Contributions in open source usually involve:
Playing games
Submitting pull requests
Only writing comments
Following creators
Which command shows all existing branches?
git branches
git log
git branch
git list
Which command creates AND switches to a new branch?
git branch -new
git switch -c <branchname>
git create <branch>
git open branch <name>
What is the purpose of merging?
To copy files
To combine code from different branches
To delete unwanted code
To rename branches
Before merging another branch into main, you must:
Delete the old branch
Switch to the main branch
Install GitHub CLI
Clone the repo again
Merge conflicts happen when:
Repo has no README
Two branches modify the same line differently
There is slow internet
GitHub server is down
