Skip to content

Instantly share code, notes, and snippets.

@swestcott
Created June 15, 2020 08:55
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 swestcott/bec3a6870891430f6ef7cfcdde0ebcc6 to your computer and use it in GitHub Desktop.
Save swestcott/bec3a6870891430f6ef7cfcdde0ebcc6 to your computer and use it in GitHub Desktop.
git fetch origin master
git checkout -b main origin/master --no-track
git push origin main
git remote set-head origin main
gh api -XPATCH "repos/:owner/:repo" -f default_branch="main"
git push --delete origin master
git branch -d master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment