Rename a branch in git flow

Yes, but if you use gitflow you also need to manually modify (I don't know if there is an automatic way to do that) the file .git/config, and rename the git-flow feature name for the feature you want to rename


You can use git-flow feature rename NewFeatureName to rename a feature.

This seems to be not very well documented. You can find the reference here


Yep.

You can do it but if you pushed your branch and someone is using it you will need to update them about the change.

gitflow branches are no different then any other branch.

Rename local branch

Git beginner (Normal way)

#Checkout new branch and delete the old one
git checkout -b <new_name>
git branch -D <old_name>

#Use the short git branch move (-m flag)
git branch -m <old_name> <new_name>

#Use the long git branch move (–move flag)
git branch --move <old_name> <new_name>

Advanced: Manually rename branch

(Not recommended- aka Don't try it at home !!!)

Rename the old branch under .git/refs/heads to the new name
Rename the old branch under .git/logs/refs/heads to the new name
Update the .git/HEAD to point to your new branch name.

Sit back and Enjoy GIT :-)