git restore --staged
Takes a change out of the box, keeping it in the file
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 restoreThrows away uncommitted changes to files. Can't be undone
- git restore --sourceBrings back a file as it was in a chosen commit
- 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