Armitage Archive

Gitflow Workflow | Atlassian Git Tutorial

by atlassian.com

Original article

This page contains highlights I saved while reading Gitflow Workflow | Atlassian Git Tutorial by atlassian.com. These quotes were collected using Readwise.

Highlights

You can think of maintenance branches as ad hoc release branches that work directly with main.

Permalink to this highlight


Hotfix branches are a lot like release branches and feature branches except they're based on main instead of develop.

Permalink to this highlight


Using a dedicated branch to prepare releases makes it possible for one team to polish the current release while another team continues working on features for the next release.

Permalink to this highlight


Creating this branch starts the next release cycle, so no new features can be added after this point—only bug fixes, documentation generation, and other release-oriented tasks should go in this branch.

Permalink to this highlight


When a feature is complete, it gets merged back into develop. Features should never interact directly with main.

Permalink to this highlight


Once it's ready to ship, the release branch gets merged into main and tagged with a version number. In addition, it should be merged back into develop, which may have progressed since the release was initiated.

Permalink to this highlight


Once develop has acquired enough features for a release (or a predetermined release date is approaching), you fork a release branch off of develop.

Permalink to this highlight


Each new feature should reside in its own branch, which can be pushed to the central repository for backup/collaboration. But, instead of branching off of main, feature branches use develop as their parent branch.

Permalink to this highlight


These long-lived feature branches require more collaboration to merge and have a higher risk of deviating from the trunk branch. They can also introduce conflicting updates.

Permalink to this highlight


project. The main branch stores the official release history, and the develop branch serves as an integration branch for features.

Permalink to this highlight


Under this model, developers create a feature branch and delay merging it to the main trunk branch until the feature is complete.

Permalink to this highlight


Gitflow is an alternative Git branching model that involves the use of feature branches and multiple primary branches.

Permalink to this highlight


The overall flow of Gitflow is:

A develop branch is created from main A release branch is created from develop Feature branches are created from develop When a feature is complete it is merged into the develop branch When the release branch is done it is merged into develop and main If an issue in main is detected a hotfix branch is created from main Once the hotfix is complete it is merged to both develop and main

Permalink to this highlight


As soon as the fix is complete, it should be merged into both main and develop (or the current release branch), and main should be tagged with an updated version number.

Permalink to this highlight


It's important to merge back into develop because critical updates may have been added to the release branch and they need to be accessible to new features.

Permalink to this highlight


Want more like this? See all articles or get a random quote.