Skip to content

Instantly share code, notes, and snippets.

@iradofurioso
Created September 17, 2022 18:39
Show Gist options
  • Save iradofurioso/bbfb6d749189758630ca62d1f514fd31 to your computer and use it in GitHub Desktop.
Save iradofurioso/bbfb6d749189758630ca62d1f514fd31 to your computer and use it in GitHub Desktop.
Renaming Branch GIt the Right Way
git branch -m main master
git fetch origin
git branch -u origin/master master
git remote set-head origin -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment