if you think people who use "master" are doing so because they fervently wish to reconstitute slavery, you may be beyond help
even my woke friends who are somewhat rational cringe at this
if you think people who use "master" are doing so because they fervently wish to reconstitute slavery, you may be beyond help
even my woke friends who are somewhat rational cringe at this
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /private/tmp/test/.git/
I think people that set this actually get to that point because they don't want to keep seeing the warning, and "main" is as good a value as any. In light of this, your harsh moral ascription seems fairly silly.When I archive repos from Github, I keep track of which branch the API says is default. Otherwise there might be no way to figure it out in the future!
One repo uses `master` but a subtree uses `main`. If you make a mistake and checkout `main` you end up clobbering your whole working tree with the subtree.
I also have tooling that used to happily assume `master`, which worked fine 99% of the time. Now it works 50% of the time, and even worse the name of the main branch is just a convention, so you can't even read a setting to see which one to use.
I don't care about the specific name. `main` would definitely have made more sense from the start (classic terrible Git naming). But I do care about pointlessly changing it and breaking everything.
If you replace checkout with switch/restore, that foot gun goes away.
[alias]
checkout-default = "!git checkout $(git rev-parse --abbrev-ref origin/HEAD | sed 's@^origin/@@')"Also it's pretty sad that this is the only part of a very informative article that you deigned to comment about.
Also, wait until people find out about what "Spanish main" is (spoiler: still slavery).