I have local commits on the master branch, but (due to unforeseen external reasons) I now can't push my changes to master and instead need to push them to a new remote branch (that can be merged back to master later).
How do I (safely) do that?
I have local commits on the master branch, but (due to unforeseen external reasons) I now can't push my changes to master and instead need to push them to a new remote branch (that can be merged back to master later).
How do I (safely) do that?
The easiest way, without creating a new local branch as mentioned in the answer before, would be:
Imagine you are on branch test
localy and want to push it to a new branch called test-remote
$ git push origin test:test-remote