Skip to content

Commit 1b64de1

Browse files
authored
add note on that master is always the default
A note that default branch name is likely different. A different branch name would be very confusing to a beginner, especially when the book asserts that the default is master.
1 parent 2af8f74 commit 1b64de1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

book/02-git-basics/sections/recording-changes.asc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ Finally, the command tells you which branch you're on and informs you that it ha
3636
For now, that branch is always `master`, which is the default; you won't worry about it here.
3737
<<ch03-git-branching#ch03-git-branching>> will go over branches and references in detail.
3838

39+
[NOTE]
40+
====
41+
GitHub changed the default branch name from `master` to `main` in mid-2020, and other Git hosts followed suit.
42+
So you may find that the default branch name in some newly created repositories is `main` and not `master`.
43+
In addition, the default branch name can be changed (as you have seen in <<ch01-getting-started#_default_branch>>), so you may see a different name for the default branch.
44+
45+
However, Git itself still uses `master` as the default, so we will use it throughout the book.
46+
====
47+
3948
Let's say you add a new file to your project, a simple `README` file.
4049
If the file didn't exist before, and you run `git status`, you see your untracked file like so:
4150

0 commit comments

Comments
 (0)