284
When you have to checkout the master branch
(lemmy.world)
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
I usually create new repos through GitHub or another central repo's system, where it defaults to calling the main branch
main. But I did recently create a new repo with my local Git'sgit init, and had to deal with amasterbranch on a completely new repo for the first time in a while. It was actually kinda a weird experience.Yeah, current company has their internal git server default to master and it was a little odd first time I created a new repo. Luckily all the CI templates can recognize either name so I just switched it.
You don't have to deal with shit if you don't want to.
If you haven’t already found it, you need to change your global git config (
~/.gitconfig):git config --global init.defaultBranch main(or whatever you want to call it; e.g.
daddywould work too)For any existing repositories you want to run the following command in the existing repository root (
./.git/config):git config set init.defaultBranch main