How To Create and Merge Branches in Git

How do developers collaborate on projects using Git?

They use something called Git branches. Every code base in Git has a master or main branch. This branch is the latest and greatest and most up to date version of your project’s codebase.

Whenever I work on a new feature or fix a bug at my company, I create my own branch which is just my own personal copy of the master branch.

I do all my development in that branch, and then when I have finalized all my changes. We do a code review of my branch and when the team is okay with my changes, I submit a pull request and my supervisors merge my branch into the master branch. And the process repeats.

Git is a really helpful tool and it’s important to know if you’re going to start coding with other people.

In this video, you’ll learn:
✅What branches are in Git
✅How to create a branch
✅How to merge a branch

Hope this is helpful!
-Henrik