Git: Version Control Fundamentals
Git: Version Control Fundamentals
Up to 20 questions, shuffled on every run
Welcome to the Git Basics Quiz! This quiz covers fundamental Git concepts, version control workflows, and collaborative development best practices. Each question is multiple-choice, and you’ll find hints to help you along the way. Good luck!
Answer key and explanations20 questions
The quiz above draws 20 questions at random from these 30, so a second attempt will not be the same run. Everything in the pool is listed here.
What is the command to initialize a new Git repository in an existing directory?
Answer`git init`
What is the "Staging Area" (Index) in Git?
AnswerA buffer for pending commits
How do you move changes from the Working Directory to the Staging Area?
Answer`git add <file>`
What is the purpose of "git commit"?
AnswerTo snapshot staged changes
What does "git status" show?
AnswerThe state of tracked files
How do you create a new branch and switch to it immediately?
Answer`git checkout -b <name>`
What is "git clone" used for?
AnswerTo copy a remote repository
What is a "Merge Conflict"?
AnswerA failure in automatic merging
What does "git pull" do?
AnswerFetches and merges data
What is "The SHA" (Hash) in Git?
AnswerA commit unique identifier
What is the purpose of a ".gitignore" file?
AnswerTo exclude untracked files
What does "git log" do?
AnswerLists the commit history
What is "git merge"?
AnswerIntegrating separate histories
What is the "HEAD" in Git?
AnswerA pointer to the active branch
What does "git push" do?
AnswerSends local commits to remote
What is "git diff"?
AnswerComparing tree and index
What is a "Remote" in Git?
AnswerA shared project repository
What is the "Main" (or "Master") branch?
AnswerThe stable production branch
What is "git stash"?
AnswerStoring uncommitted work
What is a "Fast-forward" merge?
AnswerA linear branch pointer update
What does "git fetch" do?
AnswerDownloads remote metadata
How do you undo a commit by creating a NEW commit with opposite changes?
Answer`git revert <commit>`
What is "git rebase"?
AnswerReapplying commits on a base
What is a "Fork"?
AnswerA server-side repository copy
What is a "Pull Request" (or Merge Request)?
AnswerA proposal for code integration
What is the "Working Directory"?
AnswerThe current checked-out files
What does "git remote -v" show?
Answer`The fetch and push URLs`
What happens if you run "git checkout <filename>"?
Answer`The file reverts to HEAD state`
What is "git rm"?
AnswerRemoving files from the index
What is a "Cherry-pick"?
AnswerApplying a specific commit








