Skip to content

Instantly share code, notes, and snippets.

@christyanbrayan
Created May 24, 2022 12:11
Show Gist options
  • Save christyanbrayan/a0d4a9d587f6dd9ab31e318ce48ac3e9 to your computer and use it in GitHub Desktop.
Save christyanbrayan/a0d4a9d587f6dd9ab31e318ce48ac3e9 to your computer and use it in GitHub Desktop.
Commands to update local repository with new default branch renamed
The default branch has been renamed!
master is now named main
If you have a local clone, you can update it by running the following commands.
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment