Master Git Recovering From Common Mistakes with 105 free flashcards. Study using spaced repetition and focus mode for effective learning in Programming.
Sample card
Undo the last commit but keep changes staged.
git reset --soft HEAD~1
Q · 1 of 105
Undo the last commit but keep changes staged.
Q · 2 of 105
Undo the last commit AND discard changes.
Q · 3 of 105
Undo the last commit but keep changes unstaged in the working tree.
git reset --soft HEAD~1
git reset --hard HEAD~1 ⚠ destructive.
git reset --mixed HEAD~1 (the default).
git commit --amend -m 'new message'
git add forgotten-file
git commit --amend --no-edit
git checkout -- file or modern: git restore file
git restore . followed by git clean -fd for untracked files.
git restore --staged file (or older: git reset HEAD file).
git clean -nd — dry-run.
git clean -fd ⚠ destructive.
git reflog to find its SHA, then git checkout -b rescue <sha>
git checkout <sha> (detached HEAD) — create a branch if you want to keep changes: git switch -c branch-name.
Flashcards
Flip to reveal
Focus Mode
Spaced repetition
Multiple Choice
Test your knowledge
Type Answer
Active recall
Learn Mode
Multi-round mastery
Match Game
Memory challenge