Undoing a 'git push'

前端 未结 12 1103
遥遥无期
遥遥无期 2020-11-22 13:45

Here\'s what I did on my supposed-to-be-stable branch...

% git rebase master
First, rewinding head to repla         


        
12条回答
  •  耶瑟儿~
    2020-11-22 14:08

    Another way to do this:

    1. create another branch
    2. checkout the previous commit on that branch using "git checkout"
    3. push the new branch.
    4. delete the old branch & push the delete (use git push origin --delete )
    5. rename the new branch into the old branch
    6. push again.

提交回复
热议问题