0

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?

Community
  • 1
  • 1
Quang Nguyen
  • 354
  • 1
  • 5
  • 20

0 Answers0