Step 01 / 11
What is a branch?
Concept
Keyword: branch A branch is a name that points to a commit. It's like a sticky note placed on a page of a book. The sticky note says: "I am here". When you add a new commit, the sticky note moves to the new page.
Many people think a branch is a copy of the code. That's not true.
A branch is just a pointer. It's a small file that contains the hash of a commit. Creating a branch is instant. It takes almost no disk space.
HEAD marks the active branch
Concept
Key point The main branch is not special. It's just a name. Git creates it by default, but you could call it anything. It has no special power.
“Creating a branch copies the whole project's code.” True or false?