Renaming a local branch in Git is quite simple.
To rename a branch from another branch, use this:
$ git branch -m <current-branch-name> <new-branch-name>
On the other hand, if already in the current branch, use this:
$ git branch -m <new-branch-name>
-m specifies the move operation. Pretty much the same kind of operation you would use to rename file in terminal.
To rename a branch from another branch, use this:
$ git branch -m <current-branch-name> <new-branch-name>
On the other hand, if already in the current branch, use this:
$ git branch -m <new-branch-name>
-m specifies the move operation. Pretty much the same kind of operation you would use to rename file in terminal.
Comments
Post a Comment