That means you have:
Local Repo Upstream (GitHub Repo)
.--.--o--x--y branchA <====> o--o--x branchA
(master)
But you want:
.--.--o--x branchA <====> o--o--x branchA
(mast) \
y branchB => you can push now
That means you need first to rebase onto o
what comes after x
(t1
) in order to build branchB
locally, before pushing it to your fork.
git checkout branchA
git branch branchB # creates branchB where branchA currently is
git reset --hard origin/branchA # reset branchA to x
git rebase --onto master x branchB