Topics/Git/Undo Without FearbeginnerFreeThe Rescue Playbookthe messes everyone actually makes, and the exact way out of each - drill by drillOpen the chapter at full size ↗← PreviousUndo Without FearNext →git branch & git switch: Name First, Move SecondMore in Undo Without FearYou've reached the end of this skribble — here's what's next in this module.git restore - Put a File Back🔒git restore - Put a File Backcopy a clean version of one file back onto your desk - history never movesbeginnerPremiumrestore --staged & --source🔒restore --staged & --source--staged empties the tray (the staging area), desk untouched; --source pulls any bead's copy OVER your deskbeginnerPremiumgit reset - Walk the Branch Back🔒git reset - Walk the Branch BackHEAD and your branch walk back to an older commit - a mode dial decides the fate of staging and deskbeginnerPremiumgit revert - Undo by Adding🔒git revert - Undo by Addinga new commit whose change is the exact inverse of a bad one - history only ever growsbeginnerPremium