we have a branch on remote called release/service-release-2016
I want to rename the branch to release/completed/service-release-2016
for archiving and clarity.
How do I do this?
Everything I searched for interpreted this as moving around commits and the head, etc. - I'm thinking this is probably pretty easy.
One way to do this would be to check out the remote branch to a temporary branch name locally, push to the new name on the remote, and then delete the remote branch. For example:
git checkout -b tmp origin/release/service-release-2016
Create the new remote branch:
git push origin tmp:release/completed/service-release-2016
Delete the old remote branch:
git push origin :release/service-release-2016
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With