---
title: "Git: Version Control Fundamentals"
description: "Test your knowledge of Git fundamentals with a quiz covering commits, branches, merging, rebasing, remote repositories, staging, conflict resolution, and version control best practices."
author: "Mohammad Abu Mattar"
canonical: https://mkabumattar.com/quizzes/post/git-version-control-fundamentals-quiz
---

# Git: Version Control Fundamentals

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!

## Questions

### 1. What is the command to initialize a new Git repository in an existing directory?

- `git start`
- `git init`
- `git setup`
- `git create`

**Hint:** Think "Initialize".

### 2. What is the "Staging Area" (Index) in Git?

- A remote server backup
- A buffer for pending commits
- A log of all deleted items
- A permanent project history

**Hint:** It is the middle ground between your files and a commit.

### 3. How do you move changes from the Working Directory to the Staging Area?

- `git save <file>`
- `git add <file>`
- `git stage <file>`
- `git push <file>`

**Hint:** Think "Add".

### 4. What is the purpose of "git commit"?

- To download remote files
- To snapshot staged changes
- To discard unmerged work
- To rebase a local branch

**Hint:** It takes a snapshot.

### 5. What does "git status" show?

- A list of project authors
- The state of tracked files
- The network latency speed
- A log of historical commits

**Hint:** Checking the current state.

### 6. How do you create a new branch and switch to it immediately?

- `git branch <name>`
- `git checkout -b <name>`
- `git switch <name>`
- `git move -b <name>`

**Hint:** A shortcut for checkout.

### 7. What is "git clone" used for?

- To remove a local repository
- To copy a remote repository
- To merge divergent branches
- To update user configuration

**Hint:** Copying a project.

### 8. What is a "Merge Conflict"?

- A disk space overflow error
- A failure in automatic merging
- A network authentication fail
- An empty commit message error

**Hint:** Two people changed the same line.

### 9. What does "git pull" do?

- Uploads local commits
- Fetches and merges data
- Resets the working tree
- Compares two local files

**Hint:** Fetch + Merge.

### 10. What is "The SHA" (Hash) in Git?

- The repository owner name
- A commit unique identifier
- The access token for SSH
- A command to prune history

**Hint:** The unique ID for a commit.

### 11. What is the purpose of a ".gitignore" file?

- To encrypt sensitive data
- To exclude untracked files
- To purge files from remotes
- To optimize the commit speed

**Hint:** Telling Git what NOT to track.

### 12. What does "git log" do?

- Monitors real-time changes
- Lists the commit history
- Initializes the repository
- Authenticates remote users

**Hint:** The history book.

### 13. What is "git merge"?

- A method for branch removal
- Integrating separate histories
- A method for file renaming
- Hosting code on a website

**Hint:** Combining branches.

### 14. What is the "HEAD" in Git?

- The initial root commit
- A pointer to the active branch
- The top-level project directory
- The primary remote repository

**Hint:** You are here.

### 15. What does "git push" do?

- Clears the local commit log
- Sends local commits to remote
- Fetches new remote updates
- Resolves local merge conflicts

**Hint:** Sending data away.

### 16. What is "git diff"?

- A tool for binary conversion
- Comparing tree and index
- A tool for file system cleanup
- A way to jump between branches

**Hint:** Looking for differences.

### 17. What is a "Remote" in Git?

- An external hardware drive
- A shared project repository
- A developer on another team
- A configuration file in .git

**Hint:** The version of the project on the internet.

### 18. What is the "Main" (or "Master") branch?

- A temporary feature branch
- The stable production branch
- A read-only archive branch
- A branch for user permissions

**Hint:** The default line of development.

### 19. What is "git stash"?

- A permanent deletion command
- Storing uncommitted work
- An encrypted security vault
- A directory for static assets

**Hint:** Temporarily putting changes aside.

### 20. What is a "Fast-forward" merge?

- A high-speed network upload
- A linear branch pointer update
- An automated error resolution
- A way to revert several commits

**Hint:** No new merge commit is needed.

### 21. What does "git fetch" do?

- Downloads remote metadata
- Integrates changes automatically
- Uploads local object data
- Removes the remote reference

**Hint:** Download only, no merge.

### 22. How do you undo a commit by creating a NEW commit with opposite changes?

- `git reset --hard`
- `git revert <commit>`
- `git remove <commit>`
- `git rollback <commit>`

**Hint:** Safety first.

### 23. What is "git rebase"?

- Changing the project name
- Reapplying commits on a base
- Backing up the repository
- Deleting obsolete branches

**Hint:** Rewriting history to make it linear.

### 24. What is a "Fork"?

- A critical software vulnerability
- A server-side repository copy
- A tool for dividing source files
- A method for user management

**Hint:** A personal copy of someone else's project.

### 25. What is a "Pull Request" (or Merge Request)?

- A request for billing access
- A proposal for code integration
- A command to sync remote data
- A report for project issues

**Hint:** Asking to merge your code.

### 26. What is the "Working Directory"?

- The directory of Git binaries
- The current checked-out files
- The internal .git object store
- A list of all remote branches

**Hint:** Where you actually type your code.

### 27. What does "git remote -v" show?

- `The installed Git version`
- `The fetch and push URLs`
- `A list of project developers`
- `The total count of files`

**Hint:** Verbose remote info.

### 28. What happens if you run "git checkout <filename>"?

- `The file is permanently deleted`
- `The file reverts to HEAD state`
- `The file opens in an editor`
- `The file is renamed in Git`

**Hint:** Discarding local changes.

### 29. What is "git rm"?

- A command to reset the repo
- Removing files from the index
- A command to read metadata
- A way to rename a branch

**Hint:** Removing a file.

### 30. What is a "Cherry-pick"?

- Selecting a random contributor
- Applying a specific commit
- Deleting specific file types
- Identifying the first version

**Hint:** Selecting one specific commit.
