如何在推送提交之前将分支重置为该状态

假设我在我的远程原点3分支上:master(HEAD),branch_A,branch B

我做了后续推送branch_A和branch_B

git push origin <last commit SHA of master>:branch_A
git push origin <last commit SHA of master>:branch_B

现在,我所有的三个分支都处于相同的状态,其中所有提交的所有更改都达到了master中的最后一个提交,这是我不想要的。 我确实只想在最后一次提交主服务器时进行更改。 我应该在上面的命令之前使用跟随的命令,因为在我如何推送特定的提交到远程,而不是以前的提交?

git rebase -i

但我没有这样做。 如何将branch_A和branch_B重置为push命令之前的状态?

链接地址: http://www.djcxy.com/p/49825.html

上一篇: How to reset a branch to the state before pushing to a commit

下一篇: Push only some commits to another git repository