Version Control Flashcards
7 cards from real Web Development practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Version Control flashcards as text
What is the difference between `git reset --soft`, `--mixed`, and `--hard`?
Answer: Soft keeps staged+working changes, mixed unstages them, hard discards all changes
`--soft` moves HEAD but keeps the index and working tree; `--mixed` also unstages; `--hard` discards all local changes.
What is a Git 'tag' primarily used for?
Answer: Marking specific points in history as important, such as version releases
Tags create named references to specific commits, most commonly used to mark release versions like v1.0.0.
Which command would you use to see what changes are staged for the next commit?
Answer: git diff --cached
`git diff --cached` (or `--staged`) shows the difference between the index (staging area) and the last commit.
What does a 'fast-forward' merge mean in Git?
Answer: The target branch pointer simply moves forward to the source branch tip, no merge commit needed
A fast-forward merge is possible when the target branch has no new commits since the source branch diverged, so no merge commit is created.
What does `git blame ` show?
Answer: Each line of a file annotated with the commit and author that last modified it
`git blame` shows line-by-line authorship and commit information for a file, useful for tracking when a line was introduced.
In GitHub's pull request workflow, what does 'squash and merge' do?
Answer: Combines all PR commits into a single commit before merging into the base branch
Squash and merge collapses all commits in a pull request into one clean commit on the target branch.
What is the purpose of `git bisect`?
Answer: Uses binary search to find the commit that introduced a bug
`git bisect` performs a binary search through commit history, marking commits as good or bad to isolate where a regression was introduced.
How this page was made: written with AI tools. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy