Git
0Loading crowd target
0Loading crowd target
7correct to beat the crowd
40 free Git trivia questions with answers — science & nature quiz, new questions added Oct 2026.
Git sits underneath almost every software project in the world, yet most people who use it daily know a handful of commands by heart and look up the rest. It was written in a hurry, named with a joke, and built on a few simple ideas that explain why it behaves the way it does. This quiz starts with the basic Git commands every beginner meets: creating a repository, saving work, checking what has changed and sharing it with a team. It then moves on to the commands and options for undoing mistakes, tidying up history and tracking down bugs, along with the vocabulary behind them and a little of the story of the project itself. It suits beginners checking what they have picked up, students preparing for a course or an interview, and experienced developers who want to see how much they know beyond their daily routine. Every answer comes with a short explanation, so a wrong guess still teaches something.
30 of 40 questions with answers and explanations. Play the quiz
Q 01The name Git, chosen by its creator as a joke at his own expense, is British slang for what?
An unpleasant person
An unpleasant person is the slang sense. The project's read-me adds that the name was a pronounceable three-letter combination that no common Unix command was already using.
Q 02Which technology giant paid $7.5 billion in 2018 for GitHub, the code-hosting site built around Git?
Microsoft
Microsoft was already a heavy user of the site, hosting open-source projects such as Visual Studio Code and PowerShell there, before it decided to buy the whole company.
Q 03Which programmer wrote Git in 2005 and joked that he names all his projects after himself?
Linus Torvalds
Linus Torvalds announced Git within days of starting work on it, and by the following day it was being used to store its own source code.
Q 04Which Git command sends local commits to a remote, and is refused if that remote holds newer work?
git push
git push can be forced through with the --force option, but that can make the remote repository lose commits, so the manual says to use it with care.
Q 05Which Git command copies an existing repository, full history included, into a new directory?
git clone
git clone brings down every version of every file by default, which is why almost any copy can be used to rebuild a server whose disk has been corrupted.
Q 06Git's strategy for merging more than two branches at once is named after which sea creature?
Octopus
Octopus is the strategy Git uses by default when more than two branches are merged, though it refuses any merge complex enough to need resolving by hand.
Q 07Which Git command labels every line of a file with the revision and author that last modified it?
git blame
git blame follows lines through file renames automatically, and extra options let it trace lines that were moved or copied in from another file.
Q 08Git was written because developers of which open-source project lost free use of a proprietary tool?
The Linux kernel
The Linux kernel moved quickly: work on Git began in early April 2005, and by mid-June the new tool was managing an official release of the project.
Q 09When two Git branches change the same lines of a file differently, a merge reports which problem?
A conflict
A conflict pauses the merge and leaves both versions in the file, fenced off by rows of marker characters, until someone edits it by hand.
Q 10Which Git command sets aside uncommitted changes so the working directory matches the last commit?
git stash
git stash saves the work on a stack of unfinished changes, which can be reapplied at any time, even on a different branch.
Q 11Which Git command makes a hidden .git directory in a folder, turning it into an empty repository?
git init
git init is safe to run a second time in an existing repository, because it will not overwrite anything that is already there.
Q 12Which Git command puts new or changed file contents in the staging area, ready for the next commit?
git add
git add captures a file's contents only as they are at that moment, so any later edits to the same file must be added again before they are committed.
Q 13Which Git command lists which files are staged, modified or untracked, and changes nothing itself?
git status
git status prints a hint beside each group of files, naming the command that would stage those changes or throw them away.
Q 21Which Git command downloads new commits from a remote but leaves your files and branches untouched?
git fetch
git fetch only brings the data into your local repository, so the new work can be inspected first and combined with your own when you are ready.
Q 22Which Git command, added in version 2.23, handles the branch-changing half of git checkout's job?
git switch
git switch arrived alongside a sister command for putting files back, because checkout had been doing two unrelated jobs under a single name.
Q 23Which option of git commit rewrites the most recent commit instead of adding a new one on top?
--amend
--amend builds a brand-new commit to take the old one's place, so the manual warns anyone using it on work that has already been published.
Q 14Which Git command lists a branch's commits, newest first, with each one's author, date and message?
git log
git log accepts filters such as --since and --author, so the list can be narrowed to one developer's commits from the last two weeks.
Q 15Which Git command shows line by line what has changed in the working tree but is not yet staged?
git diff
git diff with the --staged option looks one step further on, comparing what has been staged with the last commit to show what is about to be recorded.
Q 16Which Git command downloads new commits from a remote and integrates them into the current branch?
git pull
git pull, run with no arguments, takes its commits from the upstream branch that the current branch has been set up to follow.
Q 17Which plain-text file tells Git which files, such as build output or passwords, to leave untracked?
.gitignore
.gitignore has no effect on files that Git is already tracking, a common surprise for anyone who adds a pattern after the file has been committed.
Q 18Which proprietary version-control tool did Git replace after its owner withdrew the free licence?
BitKeeper
BitKeeper's owner withdrew the licence after claiming a developer had reverse-engineered its protocols. Eleven years later the tool itself was released as open-source software.
Q 19Which default name does Git give the remote repository that a local copy was first downloaded from?
origin
origin is only a convention: the remote can be renamed at any time, and a different name can be chosen when the copy is first made.
Q 20Which Git reference to the checked-out commit is called detached when it points at no branch?
HEAD
HEAD normally stores the name of a branch. While it is detached, new commits still work, but they move only this reference and leave every branch untouched.
Q 24Which short option gives git commit its message on the command line instead of opening an editor?
-m
-m can be given more than once, in which case each value becomes a separate paragraph of the finished commit message.
Q 25Which Git command undoes an earlier commit by adding a new commit that cancels out its changes?
git revert
git revert leaves the faulty commit in the history, which makes it the safe way to back out work that other people have already built upon.
Q 26Which Git command transplants a run of commits onto a new starting point, giving a linear history?
git rebase
git rebase makes new copies of the commits it moves, hence the Pro Git book's one-line warning never to use it on commits that exist outside your own repository.
Q 27Which Git command gives a commit a fixed name such as v1.0, typically to mark a release?
git tag
git tag makes two kinds of marker: a lightweight one is just a pointer to a commit, while an annotated one also stores its author's name, a date and a message.
Q 28Which Git command sets values such as user.name and user.email, which are stamped on every commit?
git config
git config writes to one of three levels, and a value in a repository's own settings file overrides the same value set for the whole computer.
Q 29Git was built as a set of programs in which language, with shell scripts wrapped around them?
C
C went on to replace most of those wrappers as well: the shell scripts around the core programs were later rewritten in it for speed and portability.
Q 30Git belongs to which family of version-control systems, unlike CVS, Subversion and Perforce?
Distributed
Distributed systems give every developer a complete mirror of the repository, which is why most Git operations need no network connection at all.