🔀Main Branch
Also known as Default Branch, Master Branch, main, master
The home branch of a repository. Work starts from it and merges back into it.
Think of it like
Think of it like the trunk of a tree. Every branch grows out of it and joins back to it.
Example
Why it matters
Definition
Example code
console
$ git config --global init.defaultBranch main
$ git init shop
Initialized empty Git repository in /home/lucy/shop/.git/Common mistake
Key takeaways
- 1The home line. Branches start and end here.
- 2Keep it working. It should always be ready to ship.
- 3main or master. Same idea, two names.