The following Git MCQs have been compiled by our experts through research, in order to test your knowledge of the subject of Git. We encourage you to answer these multiple-choice questions to assess your proficiency.
Please continue by scrolling down.
A. git begin
B. git init
C. git prepare
D. git start
A. git add ../project/experiment/
B. git add ../project/experiment
C. git add ../project/experiment/*
D. git add ../
E. git add project/
A. there is no shortcut: git branch <branchname>; git checkout <branchname> is the fastet way
B. git branch --checkout <branchname>
C. git-branch-and-checkout <branchname>
D. git checkout -b <branchname>
A. .gitignore
B. .git-exclude
C. .git-ignore
D. .gitexclude
A. .git
B. .noadd
C. .ignore
D. .gitignore
A. git clone
B. git add
C. git init
D. git copy
E. git start
A. git push
B. git add
C. git moment
D. git pull
E. git stash
A. current
B. main
C. HEAD
D. master
A. git remote add [shortname] [url]
B. git remote [shortname] [url]
A. git --help
B. git --v
C. git --bare
D. git --version
A. 128
B. 64
C. 32
D. No Limit
E. 16
A. Uses the given message as the commit message
B. Commits to master regardless of the current branch
C. Halts the commit if the current branch is the master branch
D. Commits without message
A. W3D
B. W3S
C. W3C
D. W3F
A. Yes
B. No
A. $ git stat
B. $ git status
C. git stat
D. (all of these options)
A. Steve Jobs
B. Linus Torvalds
C. Mark Zuckerberg
D. Bill Gates
E. Steve Wozniak
A. git bisect
B. git list
C. git merge
D. git log
E. git show
A. git switch <branch name>
B. git pull <branch name>
C. git checkout <branch name>
D. git fetch <branch name>
E. git clone <branch name>
A. git add all
B. git add ./
C. git add
D. git add .
A. git push
B. git pull
C. git status
D. git merge
E. git rebase
A. git --info
B. git -v
C. (none of these)
D. which git
E. git --version
A. git add file1.txt, file2.txt, file3.txt
B. git include file1.txt file2.txt file3.txt
C. git add file1.txt fil2.txt file3.txt
D. git include file1.txt, file2.txt, file3.txt
A. git pull origin master
B. git pull master
C. git pull master origin
D. git remote master
E. git get origin master
A. git diff foo.txt
B. git diff HEAD..foo.txt
C. all are correct
D. git diff foo
A. git drop HEAD /path/to/notes.txt
B. git dropback -- /path/to/notes.txt
C. git checkout -- /path/to/notes.txt
A. Commit Mesage
B. Branching Model
C. Command
D. Staging Area
A. git revert --no-edit HEAD
B. git reset --hard HEAD^
C. git commit --revert
D. git checkout HEAD@{1}
A. git reset --hard
B. git undo <branch>
C. git reset <branch>
D. git reset
E. git undo --hard
A. git --version
B. git log
C. git id
D. git ID
E. git info
A. git add all
B. git stage all
C. git stage .
D. git add .
A. git branch --remote r
B. git branch -a
C. git branch -r
D. git branch --all
A. git delete stinky
B. git branch --remove stinky
C. git branch -D stinky
D. git rm stinky
A. git undo
B. git reset
C. git revert
D. git rm
A. git configuration
B. git config -l
C. git config
D. git configuration -l
E. No way of doing that, except by editing the config file.
A. All stashes currently on the stack
B. "Successfully stashed 'list'"
C. None. This is an invalid command.
D. Information for stash called "list"
A. An ignored file
B. A file added to the index
C. A committed file
D. It does not exist
E. A file that has been modified
A. C++
B. FORTRAN
C. COBOL
D. C
E. C#
A. True
B. False
A. git config --color
B. git change --color auto
C. git config --global color.ui auto
A. --verbose=false
B. --short
C. --summary
D. --quiet
A. git add -p
B. git add partial
C. git add patch
D. git add -s
A. Cancel the previous commit (if not pushed)
B. Find your last commit
C. Find the commit which introduced a bug
D. Sign the last commit (with a gpg key)
E. Reset a file to the last commit
A. submodules
B. subrepos
C. remotes
A. git module <repository> <local directory>
B. git remote add <repository> <local directory>
C. git add <local directory> <repository>
D. git submodule add <repository> <local directory>
A. All are accepted
B. Round-Robin
C. Recursive
D. Fast-Forward
A. git bisect
B. git blame
C. git examine
D. git review
E. git revision
A. commit
B. patch
C. rebase
D. cherry-pick
E. pull
A. notepad
B. vim
C. emacs
D. system default
E. a browser
A. -s
B. --brief
C. --verbose=false
D. -b
A. Re-pack GITs object store for <upstream>
B. Replay the changes made in <upstream> on top of the changes made in the current branch (as if the changes in <upstream> had been done after the changes in the current branch)
C. Replay the changes made in the current branch on top of the changes made in <upstream> (as if the changes in the current branch had been done after the changes in <upstream>)
D. Push the changes in the current repository into a named branch in <upstream>