Computing Magazine

Rename a Branch with Git

Posted on the 17 June 2013 by Akahgy

Description:

We need to rename a branch using Git.

Solution:

This works of course only on local branches, but it should be enough.

git branch -m <current_name> <nnew_name>

You don’ need to change branch in order for this to work. Then, if you need to remove the wrongly named branch just use the delete option (-D), as described here.


Back to Featured Articles on Logo Paperblog

Magazine