Free Git Fundamentals Practice Quiz

12 practical Git Fundamentals questions with an explanation after every answer. No timer, no signup — about 8 minutes.

About the Git Fundamentals skill quiz

This Git Fundamentals quiz is a Practical fundamentals check. It covers working tree and staging, commits, branches, remotes, merge conflicts, history, and repository hygiene. The quiz has 12 questions, takes about 8 minutes, and a score around 8 out of 12 means you have a workable baseline.

The 12 questions on this page are built for practical developer workflow screening. They focus on practical decisions you would make while building, debugging, querying, or operating real projects.

Related Git Fundamentals Practice Questions

Sample Git Fundamentals questions

Three examples from the 12-question quiz. Answers stay hidden until you reveal them.

Sample Question 1Repository Hygiene

Which file tells Git to ignore build outputs such as dist/ or node_modules/?

AREADME.md
B.gitignore
C.gitattributes.lock
Dpackage.json
Show answer
Answer: B — .gitignore

.gitignore contains patterns for files Git should leave untracked. It is commonly used for dependencies, generated builds, logs, and local secrets.

Sample Question 2History

What does detached HEAD mean?

AYou are viewing a commit directly instead of being on a branch
BThe repository has no commits
CThe remote has been deleted
DGit cannot find your username
Show answer
Answer: A — You are viewing a commit directly instead of being on a branch

Detached HEAD means HEAD points at a commit instead of a branch name. You can inspect or test there, but new commits need a branch if you want to keep them easily.

Sample Question 3Debugging

A regression appeared sometime in the last 30 commits. Which Git tool helps find the first bad commit?

Agit bisect
Bgit tag
Cgit remote prune
Dgit archive
Show answer
Answer: A — git bisect

git bisect performs a binary search through history. You mark commits good or bad, and Git narrows down the first commit that introduced the problem.

Try another tech quiz

Compare your fundamentals across Git, AWS, Linux, SQL, Python, and Docker.

See all free quizzes