Skip to content

Instantly share code, notes, and snippets.

@DimaSamodurov
Created November 22, 2019 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DimaSamodurov/cb60f37ba669946941cb9cc5f3fe29c3 to your computer and use it in GitHub Desktop.
Save DimaSamodurov/cb60f37ba669946941cb9cc5f3fe29c3 to your computer and use it in GitHub Desktop.
How to rename to master branch
git checkout master2
# delete local master
git branch -D master
# rename master2 to master
git branch -m master2 master
# Push master with force option to overwrite existing remote branch.
git push --set-upstream -f origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment