Undo changes
git restore <file>
sync the working tree with the staging tree
Undo staging
git restore --staged <file>
remove the file from the staging tree
Undo commit
git revert <c1>
revert to a previous commitc1
as a new commit
Last updated
Undo changes
git restore <file>
sync the working tree with the staging tree
Undo staging
git restore --staged <file>
remove the file from the staging tree
Undo commit
git revert <c1>
revert to a previous commit c1
as a new commit
Last updated