Closed GiacomoPope closed 1 month ago
No, no reason. It creates a bit of awkwardness because people need to update their clones but that's a temporary problem.
Okay I've set the default branch to main.
Anyone with an existing clone needs to do:
# Switch to the "master" branch:
$ git checkout master
# Rename it to "main":
$ git branch -m master main
# Get the latest commits (and branches!) from the remote:
$ git fetch
# Remove the existing tracking connection with "origin/master":
$ git branch --unset-upstream
# Create a new tracking connection with the new "origin/main" branch:
$ git branch -u origin/main
Oh, and this invalidates all open PRs I think.
Oh, and this invalidates all open PRs I think.
No, it doesn't. I managed to change the base branch to main in all of the open PRs. I think that maybe was not possible in the distant past.
This is generally considered best practice now, are there any reasons not to make this change?