Unstage a deleted file in git

后端 未结 7 1757
我在风中等你
我在风中等你 2020-12-04 04:28

Usually, to discard changes to a file you would do:

git checkout -- 

What if the change I want to discard is deleting the file?

相关标签:
7条回答
  • 2020-12-04 05:24

    As of git v2.23, you have another option:

    git restore --staged -- <file>

    0 讨论(0)
提交回复
热议问题