How can I rollback a github repository to a specific commit?

后端 未结 6 1968
孤街浪徒
孤街浪徒 2020-11-28 16:44

My github has 100 commits in it right now. I need to rollback the repository to commit 80, and remove all the subsequent ones.

Why? This repo is supposed to be fo

6条回答
  •  生来不讨喜
    2020-11-28 17:43

    When doing branch updates from master, I notice that I sometimes over-click, and cause the branch to merge into the master, too. Found a way to undo that.

    If your last commit was a merge, a little more love is needed:

    git revert -m 1 HEAD

提交回复
热议问题