Difference between revisions of "Git branch -M"

From wikieduonline
Jump to navigation Jump to search
(Redirected page to Git branch)
Tag: New redirect
 
(Removed redirect to Git branch)
Tag: Removed redirect
Line 1: Line 1:
#redirect [[git branch]]
+
{{lc}}
 +
[[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}}
 +
 
 +
[[Category:Git]]

Revision as of 10:55, 11 August 2022

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

Advertising: