Flashcardsfor IT Certifications

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.

Last updated: · Report an error on this page

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