Remove a git commit which has not been pushed

前端 未结 11 726
抹茶落季
抹茶落季 2020-12-04 04:34

I did a git commit but I have not pushed it to the repository yet. So when I do git status, I get \'# Your branch is ahead of \'master\' by 1 commi

11条回答
  •  既然无缘
    2020-12-04 04:45

    One way would be to delete the local branch and checkout that branch from the server if your local branch is ahead of remote by multiple commits and you need to uncommit all of them.

提交回复
热议问题