After I made changes on a file. I use git add FILE_NAME
.
Then, I would like to revert it as not added but meanwhile keep the changes, how to do this?
git reset -- FILE_NAME
will do it.
See the git reset
manual:
This means that
git reset <pathspec>
is the opposite ofgit add <pathspec>
git stash save
git stash apply
they will all be unstaged
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With