Skip to main content
Active reading.
Source Link
Peter Mortensen
  • 31.1k
  • 22
  • 111
  • 134

Rename the branch using this command:

git branch -m [old_branch_name] [new_branch_name]

-m -m: itIt renames/movemoves the branch. If there is already a branch, you will have theget an error.

If there is already a branch and you want to rename with that branch., use:

 git rename -M [old_branch_name] [new_branch_name]

forFor more information about help., use this command in the terminal:

git branch --help 

or

man git branch

Rename branch using this command

git branch -m [old_branch_name] [new_branch_name]

-m : it renames/move the branch. If there already branch, you will have the error.

If there already branch and you want to rename with that branch.

 git rename -M [old_branch_name] [new_branch_name]

for more information about help. use this command in terminal

git branch --help 

or

man git branch

Rename the branch using this command:

git branch -m [old_branch_name] [new_branch_name]

-m: It renames/moves the branch. If there is already a branch, you will get an error.

If there is already a branch and you want to rename with that branch, use:

 git rename -M [old_branch_name] [new_branch_name]

For more information about help, use this command in the terminal:

git branch --help

or

man git branch
Fixed Grammar
Source Link

Rename branch using this command

git branch -m [old_branch_name] [new_branch_name]

-m : it renamerenames/move the branch. ItIf there already branch . You, you will have the error.

If there already branch and you want to rename with that branch.

 git rename -M [old_branch_name] [new_branch_name]

for more information about help. use this command in terminal

git branch --help 

or

man git branch

Rename branch using this command

git branch -m [old_branch_name] [new_branch_name]

-m : it rename/move the branch. It there already branch . You will have error.

If there already branch and you want rename with that branch.

 git rename -M [old_branch_name] [new_branch_name]

for more information about help. use this command in terminal

git branch --help 

or

man git branch

Rename branch using this command

git branch -m [old_branch_name] [new_branch_name]

-m : it renames/move the branch. If there already branch, you will have the error.

If there already branch and you want to rename with that branch.

 git rename -M [old_branch_name] [new_branch_name]

for more information about help. use this command in terminal

git branch --help 

or

man git branch
Source Link

Rename branch using this command

git branch -m [old_branch_name] [new_branch_name]

-m : it rename/move the branch. It there already branch . You will have error.

If there already branch and you want rename with that branch.

 git rename -M [old_branch_name] [new_branch_name]

for more information about help. use this command in terminal

git branch --help 

or

man git branch