Skip to content
View anths's full-sized avatar

Block or report anths

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
anths/README.md

Hello, GitHub users.

GitHub, and its parent company, Microsoft, continue their work with ICE.

As a community, we should be using other alternatives. I don't host any of my work here.

(It's also weirdly disapointing how centralized the ecosystem around a distributed version control system has become.)

Sourcehut is a good alternative which, in addition to not facilitiating ICE's work, is more flexible in its services and resists excess centralization.

Rename your default branch in git.

The default branch name in git, at least as of 2020, is both confusing, obscuring some of git's properties, and has some racist baggage behind it. We should use a different name, and git should change the default. To their credit, github has fixed the default branch, but git hasn't (yet?), and you can still get a nasty default if importing from elsewhere. Until git fixes this, you can correct things locally.

Rename the default branch on a local repository:

This part is trivial:

git branch -m master main

The fact that it's that simple surprises a lot of people (including me, initially), because part of the problem is the existing default name hides the fact that there's nothing special about it.

Push the new name to any remote/upstream repositories.

If you have remote/upstream repositories, push the new branch out there:

git push -u origin main

...or whatever your remote repo is, if other than "origin". You can get a list of your configured upstream repo names with:

git remote -v

If GitHub is one of your remotes (you are here, after all), you'll probably want to go to the repository's settings and change the default there. Once you do this, you'll have both the new and old names in your remote repo. To delete the old name from your remote repo, so this:

git push origin --delete master

Tell git to use better names by default.

To make git init create a repo with a better name by default, add these lines to $HOME/.gitconfig or $HOME/.config/git/config:

[init]
	templateDir = ~/.config/git/template/

Then make the template dir with a single line for

mkdir -p $HOME/.config/git/template
echo 'ref: refs/heads/main' > $HOME/.config/git/template/HEAD

There's a bit more discussion where I got the steps from and this linked Stack Overflow note on changing the default branch name.

Side note: branch names can be unicode. For example, git branch -m master 🌱 works fine. :-)

Find me elsewhere.

You can find me online at a.9srv.net, in the Fediverse🐘 as [email protected], or in the physical world🗺, usually in Columbia County, Oregon.

Popular repositories Loading

  1. conterm conterm Public

    Forked from 0intro/conterm

    Drawterm without graphical user interface.

    C 1

  2. anths anths Public

    1

  3. we-are-twtxt we-are-twtxt Public

    Forked from bonemaster/we-are-twtxt

    Voluntary registry of Twtxt users and automated feeds (bots). This registry is user contributed. If you want to list/publish your Twtxt feed, submit a PR!

    Shell

  4. plan9port plan9port Public

    Forked from 9fans/plan9port

    Plan 9 from User Space

    C