Git Tutorial #2: Branching — Work on Multiple Things at Once

In the previous tutorial, we learned to create a repository, stage files, and make commits. All our work happened on one branch — main. But what if you want to add a new feature without breaking your working code? What if two people need to work on different things at the same time? This is why branches exist. A branch is a separate line of development. You can make changes on a branch without affecting other branches. When you are done, you merge the changes back. ...

June 11, 2026 · 9 min