Cheatsheet Pages / Git Cheatsheet
How to discard local changes in a file — git restore (permanent)
Your edits in one file turned out to be a dead end and you want the committed version back.
git restore <file> # ⚠️ permanently discards unstaged changes in <file>
Good to know
Throws away unstaged edits in one file. There is no undo for this.
