git branch -M
git branch -M
With a -m or -M option, <oldbranch> will be renamed to <newbranch>. If <oldbranch> had a corresponding reflog, it is renamed to match <newbranch>, and a reflog entry is created to remember the branch renaming. If <newbranch> exists, -M must be used to force the rename to happen.
See also
git branch
,git: upstream
,git branch --delete branch name
,[ --list | -a | -r | -M ]
Advertising: