Git push accepts a source and destination refspec as part of the push operation, but I can not seem to push a local tag as a new remote branch in a single command. I am aware I could checkout the tag and then push it, but this should be possible as a single command.
What I've tried:
git push origin refs/tags/0.0.1:new_branch
What happens:
Counting objects: 1, done.
Writing objects: 100% (1/1), 156 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 1 (delta 0)
To '■■■■■■■■■■■■■■■■■■■■■■■■■■■■.com/test.git'
* [new tag] 0.0.1 -> new_branch
I've also tried variations of remotes/origin/master
instead of master, but this also creates a new tag instead of creating a remote branch based on the tag.