-
Notifications
You must be signed in to change notification settings - Fork 72
Default branch 'master' is now 'main' #165
martijneken
announced in
Announcements
-
More info here about updating your local clones:
https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch#updating-a-local-clone-after-a-branch-name-changes
If you use the main repo as your origin:
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
git remote prune origin
If you use a forked repo as your origin, first sync and rename the branch in the forked repo, then:
git branch -m master main
# repoint upstream
git fetch upstream
git branch -u upstream/main main
git remote set-head upstream -a
git remote prune upstream
# repoint origin
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
git remote prune origin
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment