search

Home  >  Q&A  >  body text

How does git roll back origin master to any commit version?

The origin branch master code needs to be rolled back.. I found that I can’t..

The current method is to use local git reset --hard xxxx, then create an old_master branch, create an olg_master branch on the remote origin, and push it...

I feel this method is very low..

What is the correct approach and how to roll back origin master?...

漂亮男人漂亮男人2813 days ago689

reply all(3)I'll reply

  • PHP中文网

    PHP中文网2017-05-02 09:33:40

    You can refer to the solution in this blog http://blog.mtxcxin.cn/blog/git how to roll back a remote warehouse.html

    reply
    0
  • 高洛峰

    高洛峰2017-05-02 09:33:40

    git log
    git reset --HARD xxxxxxxxxxxxxxxxxxxxx

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-02 09:33:40

    Don’t use reset. Wouldn’t it be better to use git revert?

    reply
    0
  • Cancelreply