How can I unstage my files again after making a local commit?

前端 未结 7 792
灰色年华
灰色年华 2020-12-22 16:16

I have executed the following command

git add 
git commit -m \"add the foo.java file\"

How can I delete my local commit now

相关标签:
7条回答
  • 2020-12-22 16:43

    To me, the following is more readable (thus preferable) way to do it:

    git reset HEAD~1
    

    Instead of 1, there could be any number of commits you want to unstage.

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