←back to thread

1062 points mixto | 1 comments | | HN request time: 0.208s | source
Show context
beej71 ◴[] No.42942594[source]
Hey all--if you find things wrong, post 'em. I'll clean 'em up. :)

Love, Beej

replies(30): >>42942620 #>>42942694 #>>42942736 #>>42943486 #>>42943604 #>>42944525 #>>42945585 #>>42945722 #>>42946123 #>>42946210 #>>42946648 #>>42946913 #>>42947174 #>>42947352 #>>42947971 #>>42948270 #>>42948388 #>>42948408 #>>42949187 #>>42949195 #>>42949987 #>>42950982 #>>42952060 #>>42953388 #>>42953692 #>>42955126 #>>42959191 #>>42961534 #>>42974297 #>>42978137 #
raju ◴[] No.42961534[source]
Let me start by saying this is wonderful work. Thank you for creating such a comprehensive resource. I haven't read through it all, but one thing did catch my eye.

Section 5.1 (https://beej.us/guide/bggit/html/split/branches-and-fast-for...)

> The default branch is called main.

> The default branch used to be called master, and still is called that in some older repos.

This is not true. Git still defaults to `master`, but allows you to change the default (for future `git init` invocations via `git config --global init.defaultBranch <name>`)

See https://github.com/git/git/blob/bc204b742735ae06f65bb20291c9...

Again, thank you. If I find anything else, I will be sure to post here.

*Update*: I also feel that referring to "older repos" sends the wrong message. *GitHub* decided to make this change, causing others to follow, and finally Git itself allows for the aforementioned configuration, but it has little to do with _newer_ or _older_, but rather preference.

replies(1): >>42967010 #
1. beej71 ◴[] No.42967010[source]
Hrm. I didn't realize. I unset `init.defaultbranch` and it uses `master` and prints a block of hints.

> hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and 'development'. The just-created branch can be renamed via this command:

That's going to make it more "interesting" to write the fix, that's for sure.

Thanks!