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 does `git reflog` provide that `git log` does not?
Answer: A history of all HEAD movements, including those from resets and checkouts
`git reflog` records every time HEAD has moved, making it possible to recover commits lost after a reset or branch deletion.
What is 'trunk-based development'?
Answer: All developers commit frequently to a single main branch, with feature flags to hide incomplete work
Trunk-based development keeps the main branch always releasable by integrating small, frequent changes directly rather than long-lived branches.
Which command renames a local Git branch?
Answer: git branch -m
`git branch -m` moves/renames a branch; when two names are provided it renames the old branch to the new name.
What is the effect of `git commit --amend`?
Answer: Modifies the most recent commit, replacing it with a new commit that includes staged changes and/or a new message
`git commit --amend` rewrites the last commit with any newly staged changes and allows editing the commit message.
What is a 'bare' Git repository?
Answer: A repository with no working directory, used as a central server-side repository
A bare repository stores only the Git data (like the `.git` folder) with no checked-out working tree, making it ideal for remote/server use.
In Git, what is the index (also called the staging area)?
Answer: An intermediate area where changes are prepared before being included in a commit
The index is a staging layer between the working directory and the commit history where you curate changes with `git add`.
What does the `--force-with-lease` flag do when pushing to a remote?
Answer: Only force-pushes if no one else has pushed to the branch since your last fetch, preventing accidental overwrites
`--force-with-lease` is a safer alternative to `--force` that aborts if the remote ref has been updated by someone else since you last fetched.
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