I'm not quite sure this is a duplicate, but if it's not, it's not really a programming question. So, I'm going to add this answer here, but it's at least a little bit off topic.
As jingx noted in a comment, Git does not really care about branch names at all. It just uses them to find commits. You can change the spelling of the name as little or as much as you like, e.g., feature/behavior
can become feature/behavior
or even jean-baptiste-emanuel-zorg
, and it all makes no difference at all to Git itself.
There are two places where it does matter, though:
Each branch, in each repository, can have an upstream set. The upstream of a branch is simply another string, but it's often the string corresponding to the remote-tracking name in your repository, which your Git creates or updates based on the branch name in some other repository.
When the remote repository Git drops branch name B1
in favor of new name B2
, your Git will—let's assume the remote is called origin
for concreteness here—create your origin/B2
on your next git fetch
. If you have enabled --prune
(fetch.prune = true
) or use it explicitly, your Git will also delete your origin/B1
; if not, it won't. Either way, the upstream setting of your own branch—let's say you've called your branch zorg
and set its upstream to origin/B1
—is now "wrong" in some way as you should change it to origin/B2
.
Humans assign significance to branch names. feature/behavior
, whether spelled in American or British style, is neutral; zorg
implies that the branch is evil. If you're in favor (or favour) of evil, you might want to rename your local branch.
The course of action required for both of these items is the same: tell your co-workers / collaborators / others that you are renaming the branch. They can take any action they need to take, based on this.