Undo an hg push (backout?)

前端 未结 4 1419
野趣味
野趣味 2020-12-24 01:38

I made a big oops, and could use some help undoing it.

We have two repositories-a fairly stable repository, and a repository we\'re working on changes in. I just ma

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-24 02:11

    hg rollback will revert the one last commit, deleting any history that would otherwise been made.

    So, if you start with this:

    *merge
    | \
    |  \
    |   *b
    *a  |
    |  / 
    *c
    

    hg rollback will give:

    *a  *b
    |  / 
    *c
    

    note that you can only do hg rollback only once.

    You should make a complete backup of the repository before doing rollback. To do this, simply hg clone the whole repository.

提交回复
热议问题