How can I undo a `git commit` locally and on a remote after `git push`

后端 未结 7 1142
隐瞒了意图╮
隐瞒了意图╮ 2020-12-02 03:28

I have performed git commit followed by a git push. How can I revert that change on both local and remote repositories?

$ git log
         


        
7条回答
  •  伪装坚强ぢ
    2020-12-02 03:58

    Alternatively:

    git push origin +364705c23011b0fc6a7ca2d80c86cef4a7c4db7ac8^:master
    

    Force the master branch of the origin remote repository to the parent of last commit

提交回复
热议问题