Feedback

Chat Icon

Learn Git in a Day

Everything you need, nothing you don't

Work on Two Things at Once
33%

What Branches Actually Are

When you ran git init back in Chapter 3, Git created a default branch called main. Every commit you've made so far lives on this branch. You can confirm this by running:

git branch
* main

The asterisk (*) shows which branch you're currently on.

A branch is really just a label that points to a specific commit. When you make a new commit, the label moves forward to point to it. Creating a new branch simply creates a new label - it doesn't copy any files or take up extra space.

Learn Git in a Day

Everything you need, nothing you don't

Enroll now to unlock all content and receive all future updates for free.

Unlock now  $9.99$7.49

Hurry! This limited time offer ends in:

To redeem this offer, copy the coupon code below and apply it at checkout:

Learn More