How to Unstage and Discard in a single command in git
In git,
to unstage a filegit reset HEAD <filename>
is used
to discard changes git checkout <filename>
is used
I开发者_开发技巧s there a way to combine these two commands in one?
Try
git checkout HEAD <filename>
精彩评论