NEW
Font size
WorksheetsGITHUB
Total questions: 16
Worksheet time: 8mins
You just made a mistake in a git repo. Which command shall undo this misktake
git clone
git init
git restore .
git config -l
Which command initializes a new Git repository?
git start
git init
git new
git create
Which command sets the global username ?
Which command shows the commit history?
git status
git log
git init
git add .
When you clone a public repo the name of the remote repo by default is
git
github
origin
remote
Which key do you paste in github ?
Public Key
Private Key
The first commands to run after just installing git in pc is
git config --global
git log
git push
git pull
When you run git add . the files are moved to
staging area
version database
remote repo
The command to check existing git configuration
git status
git init
git log
git config -l
Command to discard all changes since the last commit.
git reset --hard
git reset --soft HEAD~1
Command to undo the last commit and discard all changes
git reset --hard HEAD~1
git reset --mixed HEAD~1
Command to find name of existing branch
git status
git log
git branch
git init
Anyone can push to a public Github repo.
True
False
When you add collaborator to a public repo, he/she can push to the repo.
True
False
A public github repo can be viewed and cloned by anyone.
True
False
You cloned a github repo. You want to find out the name of the remote repo. Which command do you use ?
git status
git config -l
git branch
git log
