Skill test

Git test: 24 questions to check yourself

10,286 open jobs name Git today, with a median advertised pay of $154K. 24 questions from beginner to advanced, about 10 to 15 minutes, the kind that come up in interviews.

In plain words: Git keeps the full history of a project’s files, so people can work on the same code and go back to any earlier version. Answer 24 questions, press the button, and see which you got right, why, and your score by topic.

beginner questions
9
intermediate questions
12
advanced questions
3
take as long as you like
No timer

What the 24 questions cover: Basics (3), Remotes (3), Undoing changes (3), Staging (2), Commits (2), Branches (2), Conflicts (2), History (2), Rebasing (2), Merging, Stash, Tags. The number in brackets is how many questions a topic has.

1What is Git? Beginner · Basics
2What does git init do? Beginner · Basics
3What does git add report.txt do? Beginner · Staging
4What does git commit -m "Fix login" do? Beginner · Commits
5Which command shows what has changed and what is staged? Beginner · Staging
6What does git clone URL do? Beginner · Remotes
7What does git push do? Beginner · Remotes
8What is a branch in Git? Beginner · Branches
9Which command creates a branch called feature and switches to it? Beginner · Branches
10What is the difference between git fetch and git pull? Intermediate · Remotes
11When does a merge conflict happen? Intermediate · Conflicts
12You have fixed the conflict markers in a file. What comes next in a merge? Intermediate · Conflicts
13What is a fast-forward merge? Intermediate · Merging
14What does git revert abc123 do? Intermediate · Undoing changes
15How do git reset --soft HEAD~1 and git reset --hard HEAD~1 differ? Intermediate · Undoing changes
16What does git restore report.txt do? Intermediate · Undoing changes
17You must change branch but your work is not ready to commit. What helps? Intermediate · Stash
18What does git cherry-pick abc123 do? Intermediate · Commits
19What does git blame app.py show? Intermediate · History
20What is a tag in Git? Intermediate · Tags
21You add secret.env to .gitignore, but Git still tracks it. Why? Intermediate · Basics
22What does git rebase main do when you are on a feature branch? Advanced · Rebasing
23Why should you avoid rebasing commits others already use? Advanced · Rebasing
24You reset a branch by mistake and the commits seem lost. What can find them? Advanced · History

Questions

Questions about this test

How do I prepare for a Git interview?
Work through realistic questions, read why each answer is right, then redo the ones you missed. This test has 24, from beginner to advanced, of the kind interviewers commonly ask. Then read the postings: the 10,286 open jobs that name Git show what employers expect on top of it.
Is this Git test free?
Yes. It needs no account and no email, runs in your browser and sends nothing anywhere.
How long does the Git test take, and is there a time limit?
Most people need 10 to 15 minutes for the 24 questions. There is no timer: you can stop, think and come back later in the same tab, and nothing is sent anywhere.
Do I get a certificate for the Git test?
No. It is a practice test for checking yourself before an interview, not an exam, so nobody issues a certificate and nobody sees your score.
What does my score mean?
It is a self-check. 80% or more right means the basics are fresh; half to 80% means a good base with gaps; under half means more practice first. The result also shows your score by topic, so you know what to study. It is not an official certificate.
How can I test my Git skills?
Use a small project of your own: create branches, cause a merge conflict on purpose and solve it, undo a commit with revert, and rebase a branch on main. If you can explain what each command did to the history, you are ready for most interview questions.
Is Git hard to learn?
The daily commands (status, add, commit, push, pull, switch) take an afternoon. The harder part is the model behind them: commits, branches as pointers and the difference between undoing with revert and with reset.
What is the difference between Git and GitHub?
Git is the version control program that runs on your machine. GitHub is a website that hosts Git repositories and adds pull requests, issues and automation; GitLab and Bitbucket do similar work.
What Git questions come up in interviews?
Most often merge against rebase, fetch against pull, how to solve a conflict, how to undo a commit that is already pushed, and how your team uses branches.

More tests: SQL Excel Python JavaScript Linux Docker React Java Power BI All tests