Delete last commit in bitbucket

后端 未结 9 1329
隐瞒了意图╮
隐瞒了意图╮ 2020-12-12 10:17

I made a mistake and I don\'t know how to delete my latest push in the repository. I pull the latest updates of the app but it has conflicts and I push it to repository.

9条回答
  •  无人及你
    2020-12-12 11:10

    you can reset to HEAD^ then force push it.

    git reset HEAD^
    git push -u origin master --force
    

    It will delete your last commit and will reflect on bitbucket as commit deleted but will still remain on their server.

提交回复
热议问题