Manage git workflow between multiple branches
Project description
Brancher
Brancher is a tool inspired by git flow that is more flexible in how it handles branching. It allows any configuration of branches and simply makes it easier to see which commits are in what branch, as well as advancing changes between branches. A typical branch layout may be like this:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ develop ├──▶│ staging ├──▶│ beta ├──▶│ master* │
└─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
*production branch
Note: Brancher can handle other configurations, assuming there's one final "production" branch and any number of sequential pre-production branches to the left of it.
Installation
pip3 install gitbrancher
Available Commands
Commands:
- overview (o): Prints an overview of branches with outstanding commits
- forward (f): Fast forwards commits into branch
- backfix (b): Applies changes on more advanced branches to current one
- compare (c): Shows commits in one branch but not another
- init: Initialize repo
Add -h
to any command for usage details.
Usage
Initialization
Let's start with an example of an empty repo.
Next, initialize Brancher. Brancher will store your branching model in your repository's local configuration.
Advancing commits
Now let's start some development work.
That looks good, so we'll advance that commit to staging
, the next branch after develop
.
While staging
is having some Q/A work done, we'll continue development in develop
:
Commit overview
With pending commits in develop
and staging
, let's get an overview of what commits exist where.
Backfilling hotfixes
With development work ongoing and Q/A happening on staging
, let's make an urgent bugfix to production. As you can see, once that commit has been made, it only exists on the master
branch, not other branches.
We want to bring that hotfix back into develop
. After checking out develop
, we'll apply the hotfix to develop too:
An overview confirms that the backfilled changes have been applied to develop
, but not beta
or staging
:
We can remedy this by applying the hotfix to those environments, also:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for gitbrancher-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 146bc6f6785f63becbe10f15110e789f5afd0d1f150aa249cf5ccfdb6a315993 |
|
MD5 | 84e6a389999a6788664571b7c038107f |
|
BLAKE2b-256 | 67e6afdc50e13fe75f8c3807b3d929ff227244f9a1e314319822a96f3cb6119b |