A git branch meant to be alternative fail to be swapped
by BudiKusasi from LinuxQuestions.org on (#5APVW)
I made a branch meant to be experimental and alternative to master so did
Code:git branch Mafter it's been worked, it turns out to be better, so did swap:
Code:git branch -m master old
git branch -m M masterbut when ready, did push, suddenly
fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use
git push origin HEAD:M
...
It didn't get synchronized into remote git.
How's the correct one, will anyone point out the important missing/subtle step ?


Code:git branch Mafter it's been worked, it turns out to be better, so did swap:
Code:git branch -m master old
git branch -m M masterbut when ready, did push, suddenly
fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use
git push origin HEAD:M
...
It didn't get synchronized into remote git.
How's the correct one, will anyone point out the important missing/subtle step ?