That is correct, the current default is still "master", but there is a
general trend towards the politically correct "main". Whatever you guys
decide to use, it is super easy to change it. But it should be done now,
before everyone starts working with it. I suggest to do the following,
if we want to rename it:

$ git checkout master
$ git branch main
$ echo "Please use branch 'main'" > README.md
$ git add README.md
$ git commit -m "README.md info to switch over to branch 'main'"
$ git push origin master
$ git checkout main
$ git push origin main

Of course, that can also be done from an IDE, and a variant would also
be to delete all files but one read-me on the old branch, to make sure
nobody starts building and committing there anymore. The branch could
still be kept, at least for a while, to inform everyone that we have a
new default branch.

Then change default branch in GitHub settings [2] (yields 404 for people
without admin rights for the repo like me).

[1] 
https://git-scm.com/docs/git-init#Documentation/git-init.txt---initial-branchltbranch-namegt
[2] https://github.com/apache/xalan-java/settings/branches

-- 
Alexander Kriegisch
https://scrum-master.de


Gary Gregory schrieb am 21.12.2023 23:11 (GMT +07:00):

>> Reminder: At some point we should rename master to main, to conform
>> to current Git practice.
> 
> Uh? Not according to git itself:
> 
> "The default branch name in Git is master. As you start making
> commits, you’re given a master branch that points to the last commit
> you made."

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to