Skip to content

Instantly share code, notes, and snippets.

@gandresto
Created October 12, 2022 20:14
Show Gist options
  • Save gandresto/63ebe02e58a9e17d1c8a1b8cf1d30ad0 to your computer and use it in GitHub Desktop.
Save gandresto/63ebe02e58a9e17d1c8a1b8cf1d30ad0 to your computer and use it in GitHub Desktop.
update local branch name from remote
git branch -m oldname newname
git fetch origin
git branch -u origin/newname newname
git remote set-head origin -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment