git restore
Throws away uncommitted changes to files. Can't be undone
Words that go with it
- git diffShows exactly what changed, line by line: red removed, green added
- git reset --hardDeletes commits and changes. Not used in this course
- git restore --sourceBrings back a file as it was in a chosen commit
- git restore --stagedTakes a change out of the box, keeping it in the file
- git revertMakes a new commit that does the opposite of an old one. Safe after pushing
- StagedChanges put in the box with git add, ready to commit
- Untracked fileA new file Git has never saved
- Working filesYour files as they are now, including changes Git hasn't saved