Skip to content

Instantly share code, notes, and snippets.

@diter14
Last active August 16, 2017 15:32
Show Gist options
  • Select an option

  • Save diter14/04a680899a5f05a0d013d5d413a9bf1f to your computer and use it in GitHub Desktop.

Select an option

Save diter14/04a680899a5f05a0d013d5d413a9bf1f to your computer and use it in GitHub Desktop.
git branch -m old_branch_name new_branch_name # Rename branch locally
git push origin :old_branch_name # Delete the old branch
git push --set-upstream origin new_branch_name # Push the new branch, set local branch to track the new remote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment