Flashcard Deck · 20 cards · Public

Git & Version Control Essentials

Master advanced Git mechanics, interactive workflows, and emergency recovery commands with this high-yield flashcard deck designed for software engineers.

Cards in this deck

(20 cards)

Preview terms and definitions before starting your study session.

#1
Term
What is the primary architectural difference between git merge and git rebase?
Definition
git merge creates a new 'merge commit' combining two branch histories while preserving exact chronological order and original commit hashes. git rebase rewrites history by moving the entire feature branch onto the tip of the target branch, creating new commit hashes and a strictly linear history.
#2
Term
What does git reset --soft <commit> do?
Definition
Moves the HEAD pointer to <commit> without modifying the Staging Area (Index) or Working Directory. All uncommitted changes remain staged, making it ideal for squashing recent local commits.
#3
Term
What does git reset --mixed <commit> do?
Definition
Moves the HEAD pointer to <commit> and resets the Staging Area to match, but leaves your Working Directory untouched. Changes become unstaged modifications. This is the default mode for git reset.
#4
Term
What does git reset --hard <commit> do?
Definition
Moves the HEAD pointer to <commit> and forcefully resets both the Staging Area and Working Directory to match. All uncommitted local changes and untracked modifications since <commit> are permanently lost.
#5
Term
What is git reflog and how is it used to recover lost commits?
Definition
git reflog (reference log) records every local update to tip of branches and HEAD (even across resets/branches). To recover a lost commit, run git reflog, find the desired commit hash, and run git reset --hard <hash> or check it out into a new branch.
#6
Term
How does Interactive Rebase (git rebase -i <commit>) work?
Definition
Opens a text editor listing all commits from <commit> to HEAD, allowing you to reorder, edit, drop, or combine commits using commands like pick, reword, edit, squash, and fixup before applying changes.
#7
Term
What is git cherry-pick <commit-hash>?
Definition
Applies the exact change introduced by a specific commit from another branch onto your current HEAD as a new commit. Useful for porting single bug fixes across branches without merging full branch histories.
#8
Term
What is git bisect and what search strategy does it use?
Definition
git bisect uses a binary search algorithm to locate the exact commit that introduced a bug. You mark a known bad commit and a known good commit, and Git checks out intermediate commits for testing until the culprit commit is isolated.
Showing 8 of 20 cards in this deck.
Study All Now