D1: Key Git Concepts — Repos, Commits, Branches
GH-900 GitHub Foundations exam practice questions · 12 flashcards
Question
What is a repository?
1 / 12
Tip: Space flips the card, ← / → navigate.
Show all 12 Key Git Concepts — Repos, Commits, Branches practice questions and answers
- What is a repository?A project folder tracked by Git containing files and their complete revision history.
- What is a commit?A saved snapshot of staged changes with an author, timestamp, message and parent commit(s).
- What is the staging area (index)?Where you prepare changes with git add before committing them.
- Three states of a file in Git?Modified (changed), staged (marked for next commit), committed (stored in the repository).
- What is a branch?A lightweight movable pointer to a commit, used to develop work in isolation.
- What is the default branch?The base branch new pull requests target and that's shown first, usually 'main'.
- What is HEAD?A pointer to the currently checked-out commit/branch.
- What does git merge do?Combines another branch's history into the current branch, possibly creating a merge commit.
- What does git rebase do?Re-applies commits on top of another base commit, producing linear history.
- What is a tag?A named pointer to a specific commit, commonly used to mark releases (e.g. v1.0.0).
- What is .gitignore?A file listing patterns of files Git should not track (build output, secrets, dependencies).
- Basic Git workflow commands?git init/clone → edit → git add → git commit → git push.