Did you know that the #rust #rustlang project will soon break everyones workflows?

#git #github

@musicmatze So what, it's just a branch rename, as has happened in many projects.

As long as they take care of any GitHub fallout (autoclosed PRs for lack of target) ... for a user in git, that's well managable.

@chrysn still breaks workflows

@musicmatze https://xkcd.com/1172/ ;-)

More seriously: Given how widespread the new default is by now, at some point there's a break-even between breakage from the change and users whose muscle memory needs constant overwriting forcing `master` instead of `main`, esp. when other ma- branches defeat tab complete. That break-even may just as well be now-ish.

Workflow

xkcd
@chrysn it is not the "new default". `git` did never change to `main` as a default branch, only the dominant code forges (shithub and shitlab) did. The default of the tool itself is still `master` and IIRC there are no plans to change that default.

@musicmatze `ls --sort time | head -n100 | xargs -n1 sh -c 'cat $0/.git/HEAD' | sort | uniq -c` gives me 45 main and 23 master for projects I touch regularly, and that ratio only gets stronger the less I extend this to ages old projects.

Looks pretty default to me, and the technical git default comes with a big yellow warning "hint: Using 'master' as the name for the initial branch. This default branch name is subject to change.".

@chrysn git does that for 5 years at this point and it will change with git 3.0 (whenever this will happen is not known yet AFAIK): https://github.com/git/git/commit/675704c74dd4476f455bfa91e72eb9e163317c10
init: provide useful advice about init.defaultBranch · git/git@675704c

To give ample warning for users wishing to override Git's the fall-back for an unconfigured `init.defaultBranch` (in case we decide to change it in a future Git version), let's introduce so...

GitHub

@musicmatze @chrysn afaict the plan is to change that default with the next major version (3.0) of git, cf. https://git.kernel.org/pub/scm/git/git.git/tree/Documentation/BreakingChanges.adoc:

> In new repositories, the default branch name will be `main`. We have been
warning that the default name will change since 675704c74dd (init:
provide useful advice about init.defaultBranch, 2020-12-11).

'main' is also mentioned in the "First-Time Setup" (https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) as an alternative default branch name.

BreakingChanges.adoc « Documentation - git.git - The core git plumbing