How to reset a branch to the state before pushing to a commit
Let's say I have on my remote origin 3 branches: master (HEAD), branch_A, branch B.
I did the followed push for branch_A and branch_B
git push origin <last commit SHA of master>:branch_A
git push origin <last commit SHA of master>:branch_B
Now all of my three branches are in the same state with all the changes of all commits up to the last commit in master , what I don't want to have. I did just want to have only the change in last commit of master . I should use followed command before the above commands as in How can I pushing specific commit to a remote, and not the previous commits?
git rebase -i
But I did not do it. How can I reset the branch_A and branch_B to the state before the push commands?
链接地址: http://www.djcxy.com/p/49826.html下一篇: 如何在推送提交之前将分支重置为该状态