Home > Ren's Free Time > Rename local and remote git branch

Rename local and remote git branch

Below steps to rename local and remote git branch :

  • Checkout to destination branch git checkout destination_brach
  • Rename branch name git chechout -m new_branch_name
  • Delete the old-name-branch remote branch and push the new-branch-name local branch git push <remote> :old-name-branch new-branch-name
  • Reset the upstream branch for the new-branch-name local branch git <remote> -u new-branch-name

Thank you đŸ™‚

  1. No comments yet.
  1. No trackbacks yet.

Leave a comment