Git — 60 questions
Play ▸- #1 · What does this command create in the current directory?
- #2 · What does
MMmean forapp.js? - #3 · Which command lets you review a modified file hunk by hunk and stage only some of the hunks?
- #4 · What does this command compare?
- #5 ·
debug.logis still reported as modified because it was already tracked. Which command stops tracking it but keeps the file on disk? - #6 · Why is nothing staged for
logs/? - #7 · What does this command do?
- #8 · Which command deletes the branch anyway, discarding its unmerged commits?
- #9 · Which command keeps these two new commits safely on a branch?
- #10 · Which sequence lets you switch while keeping your edits for later?
- #11 · Which branch does
git switch -take you to? - #12 · What is special about the commit just created?
- #13 · What does the merge do here?
- #14 · You ran
git merge featwhile onmain. Which line ismain's version? - #15 · Which command marks
config.inias resolved? - #16 · What state is the repository in right after this?
- #17 · During
git merge featwith a conflict inf, what doesgit checkout --theirs fput in the working tree? - #18 · What does this command do?
- #19 · Whose version of
fis now in the working tree? - #20 · In this interactive rebase todo list, what happens to commit
e4f5a6b? - #21 · In the todo list opened by
git rebase -i HEAD~3, which commit is on the first line? - #22 · What is the next command to run?
- #23 · Which commits are replayed onto
main? - #24 · How does the fixup commit appear in the todo list?
- #25 · What does
--onelinechange in the output? - #26 · Which commit is
HEAD^2? - #27 · Which commits does the last command list?
- #28 · What does this command show?
- #29 · Which commits does this list?
- #30 · What does this command print?
- #31 · Which command makes commit
Bthe branch tip again? - #32 · What happens to the changes from the undone commit?
- #33 · What does the last command print?
- #34 · How does
git stash popdiffer fromgit stash apply? - #35 · You are on
main, which was the first parent of the merge. Which command undoes the merged-in changes? - #36 · What does the second command do?
- #37 · What does
.git/HEADcontain now? - #38 · Which Git object type stores the contents of a file?
- #39 · What does the
treeline refer to? - #40 · How many new blob objects does
git addstore? - #41 · What does a loose branch ref file such as
.git/refs/heads/maincontain? - #42 · What is the
.git/indexfile? - #43 · Why does this command fail?
- #44 · Which command publishes the tag?
- #45 · What does
git tag -a v2.0 -m "Release"create thatgit tag v2.0does not? - #46 · What does the
-xflag add? - #47 ·
libs/uiis a submodule. Which command checks out its content? - #48 · What does setting
rerere.enabledtotruedo? - #49 · Which settings must be configured to fix this?
- #50 · Which email is recorded on the commit?
- #51 · What can you do after running this?
- #52 · On Windows, what does
core.autocrlf=truedo? - #53 · Which setting makes a plain
git pushcreate and track the remote branch automatically? - #54 · Which setting changes the name of the first branch that
git initcreates? - #55 · What does
git pull --rebasedo differently from a merginggit pull? - #56 · What does this message mean?
- #57 · Which description matches this state?
- #58 · What should you do before pushing again?
- #59 · Why was this forced push refused?
- #60 · Which command removes the stale
origin/old?