开发者

How to Unstage and Discard in a single command in git

开发者 https://www.devze.com 2023-01-26 11:53 出处:网络
In git, to unstage a file git reset HEAD <filename>is used to discard changesgit checkout<filename> is used

In git,

to unstage a file git 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>
0

精彩评论

暂无评论...
验证码 换一张
取 消