Understanding the branching workflow

When you start using Git, you might be tempted to push all your code directly to the master branch. This might not be very good for multiple reasons, one of them being that you can't experiment with new features very well as you pushed everything to master. You can't simply delete the branch and start over.

The branching workflow tries to solve this by making sure that the master branch is always the latest stable code, and it has to be deployable at all time. So, only code that has been tested and proven to work can go in there.

Let me explain this a bit further.

When you start working on a new feature, you create a new branch, which is named after the feature you're working on. This branch is separate from the ...

Get GitLab Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.