🌍 Git & Version Control · flashcards
Git & Version Control Version Control Fundamentals Flashcards
51 question-and-answer cards covering Version Control Fundamentals as it is examined in Git & Version Control. 24 of them are printed below, taken from across the deck — no signup, no paywall on the preview.
24 sample cards from the Version Control Fundamentals deck
Sampled from the end of the deck, so these are different cards from the ones shown on the syllabus page.
What are the three main states a file can be in within Git?
Modified, Staged, and Committed.
Define the 'modified' state in Git.
The file has been changed in the working directory but the change has not yet been staged (added to the index).
Define the 'staged' state in Git.
A modified file has been marked (via git add) to go into the next commit; it sits in the staging area (index).
Define the 'committed' state in Git.
The data is safely stored in the local Git database (the .git directory); the staged snapshot has been recorded permanently as a commit.
What are the three main sections/trees of a Git project that correspond to the three states?
The working directory (working tree), the staging area (index), and the Git directory (.git repository/database).
What is the staging area (index) in Git?
A file, generally in the .git directory, that stores information about what will go into your next commit; it lets you build up commits selectively before recording them.
Outline the basic Git workflow across the three trees.
You modify files in the working directory, selectively stage the changes you want (git add) into the index, then commit (git commit) to store a permanent snapshot in the .git directory.
What are the four fundamental object types Git stores in its database?
Blob (file contents), tree (directory listing pointing to blobs and other trees), commit (a snapshot with metadata), and tag (annotated tag object).
What does a Git blob object store?
The raw contents of a file — just the data, with no filename or metadata; the blob is identified by the SHA-1 of its contents.
What does a Git tree object represent?
A directory: it lists filenames and permissions, pointing to blob objects (files) and other tree objects (subdirectories).
What information does a Git commit object contain?
A pointer to the top-level tree (the snapshot), the author and committer with timestamps, the commit message, and pointers to zero or more parent commits.
How is a Git object's identity/storage key determined, making Git a content-addressable filesystem?
By computing the SHA-1 hash of the object's contents; identical content always yields the same hash, so objects are stored and retrieved by their checksum.
What is the .git directory, and what does it contain?
It is the repository — the hidden directory Git creates on git init or git clone that stores all objects, refs, the config, HEAD, the index, hooks, and logs; it is the heart of a Git repo.
Name key items you would find inside the .git directory.
objects/ (the object database), refs/ (branch and tag pointers), HEAD (current ref), config (local config), index (staging area), hooks/, and logs/.
What is a reference (ref) in Git?
A human-friendly named pointer to a commit SHA-1, stored under .git/refs (e.g., branches in refs/heads, tags in refs/tags), so you don't have to remember raw hashes.
What is HEAD in Git?
A pointer to the current branch reference (usually a file .git/HEAD containing something like 'ref: refs/heads/main'); it indicates the branch/commit you currently have checked out.
What does it mean to be in a 'detached HEAD' state?
HEAD points directly to a specific commit rather than to a branch, so new commits are not on any branch and can be lost if you switch away without creating a branch.
Where are local branch pointers stored inside .git, and what do they contain?
In .git/refs/heads/, one file per branch, each containing the SHA-1 of the commit at the tip of that branch.
What is a shell (or terminal) and why is it central to using Git?
A shell is a command-line interpreter (e.g., Bash, Zsh, PowerShell) that runs typed commands; Git's full functionality is exposed through its command-line interface, run in a terminal.
Name a few essential shell navigation/file commands a Git user should know.
pwd (print working directory), ls (list files), cd (change directory), mkdir (make directory), rm (remove), and cp/mv (copy/move).
What is a Git alias, and how do you create one?
A shortcut for a longer Git command, created with git config, e.g., git config --global alias.co checkout lets you type 'git co' instead of 'git checkout'.
Give an example of a useful Git alias that shortens a common command.
git config --global alias.st status (so 'git st' runs 'git status'); other common ones are alias.ci commit, alias.br branch, and alias.unstage 'reset HEAD --'.
Compare Git GUI clients versus the command-line interface (CLI).
The CLI is the only place all Git commands are available and works everywhere identically; GUI clients (e.g., GitKraken, Sourcetree, GitHub Desktop) are more visual and beginner-friendly but implement only a subset of features, so learning the CLI ensures full capability.
Why is it recommended to learn the Git command line even if you plan to use a GUI?
Because GUIs only expose a subset of Git's functionality; knowing the CLI means you can perform any operation, understand what the GUI does under the hood, and work on any system where only a terminal is available.
What this deck covers
The Version Control Fundamentals deck follows the Git & Version Control Version Control Fundamentals syllabus — 4 chapters and 15 topics — so questions land on material that is genuinely examinable rather than trivia around it. That works out to roughly 12.8 cards per chapter.
Answers are written to be recallable, not just readable — averaging about 151 characters, which is long enough to carry the reasoning and short enough to say out loud.
A deck like this earns its keep on the second and third pass. Read the syllabus first so you know the shape of the subject, then use the cards to find the specific facts that have not stuck.
Version Control Fundamentals flashcards FAQ
How many Version Control Fundamentals flashcards are in this Git & Version Control deck?
51 cards. This page previews 24 of them, sampled evenly across the deck so you can judge the difficulty before installing anything.
Are these Git & Version Control flashcards free?
Yes. The preview here is free to read with no signup, and the full 51-card deck is free inside the Examius app.
What do the Version Control Fundamentals cards cover?
They follow the Git & Version Control Version Control Fundamentals syllabus — 4 chapters and 15 topics — so the questions track what is actually examinable.
How should I use these flashcards?
Read the syllabus first so you know the shape of the subject, then drill the deck. Examius schedules each card with spaced repetition, so cards you keep missing come back sooner and ones you know drift further apart.