gitbrancher


Namegitbrancher JSON
Version 1.2.0 PyPI version JSON
download
home_pageNone
SummaryManage git workflow between multiple branches
upload_time2024-06-26 15:16:05
maintainerNone
docs_urlNone
authorKen Kinder
requires_python<4.0,>=3.9
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```shell
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.

![First Commit](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-01-first-commit.png)

Next, initialize Brancher. Brancher will store your branching model in your repository's local configuration.

![Brancher init](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-02-init.png)

### Advancing commits

Now let's start some development work.

![Development work](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-03-dev-work.png)

That looks good, so we'll advance that commit to `staging`, the next branch after `develop`.

![Advancing commits](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-04-forward.png)

While `staging` is having some Q/A work done, we'll continue development in `develop`:

![More development work](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-05-more-dev-work.png)

### Commit overview

With pending commits in `develop` and `staging`, let's get an overview of what commits exist where.

![Overview](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-06-overview.png)

### 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.

![Hotfix to production](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-07-hotfix.png)

We want to bring that hotfix back into `develop`. After checking out `develop`, we'll apply the hotfix to develop too:

![Backfix to staging](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-08-backfix.png)

An overview confirms that the backfilled changes have been applied to `develop`, but not `beta` or `staging`:

![Overview hotfix](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-09-overview-hotfix.png)

We can remedy this by applying the hotfix to those environments, also:

![Backfill beta](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-10-backfix-beta.png)

![Backfill stagign](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-11-backfix-staging.png)


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gitbrancher",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Ken Kinder",
    "author_email": "ken+github@kkinder.com",
    "download_url": "https://files.pythonhosted.org/packages/0e/c6/daad700db0700e9845c3eeab0b634aab587b5f556daefc62484a96594a78/gitbrancher-1.2.0.tar.gz",
    "platform": null,
    "description": "# Brancher\n\nBrancher 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:\n\n```\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510   \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510   \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510   \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502     develop     \u251c\u2500\u2500\u25b6\u2502     staging     \u251c\u2500\u2500\u25b6\u2502      beta       \u251c\u2500\u2500\u25b6\u2502     master*     \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518   \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518   \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518   \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\n                                                                 *production branch\n```\n\n**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.\n\n## Installation\n\n```shell\npip3 install gitbrancher\n```\n\n## Available Commands\n\nCommands:\n\n- overview (o): Prints an overview of branches with outstanding commits\n- forward (f): Fast forwards commits into branch\n- backfix (b): Applies changes on more advanced branches to current one\n- compare (c): Shows commits in one branch but not another\n- init: Initialize repo\n\nAdd `-h` to any command for usage details.\n\n## Usage\n\n### Initialization\nLet's start with an example of an empty repo.\n\n![First Commit](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-01-first-commit.png)\n\nNext, initialize Brancher. Brancher will store your branching model in your repository's local configuration.\n\n![Brancher init](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-02-init.png)\n\n### Advancing commits\n\nNow let's start some development work.\n\n![Development work](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-03-dev-work.png)\n\nThat looks good, so we'll advance that commit to `staging`, the next branch after `develop`.\n\n![Advancing commits](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-04-forward.png)\n\nWhile `staging` is having some Q/A work done, we'll continue development in `develop`:\n\n![More development work](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-05-more-dev-work.png)\n\n### Commit overview\n\nWith pending commits in `develop` and `staging`, let's get an overview of what commits exist where.\n\n![Overview](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-06-overview.png)\n\n### Backfilling hotfixes\n\nWith 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.\n\n![Hotfix to production](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-07-hotfix.png)\n\nWe want to bring that hotfix back into `develop`. After checking out `develop`, we'll apply the hotfix to develop too:\n\n![Backfix to staging](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-08-backfix.png)\n\nAn overview confirms that the backfilled changes have been applied to `develop`, but not `beta` or `staging`:\n\n![Overview hotfix](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-09-overview-hotfix.png)\n\nWe can remedy this by applying the hotfix to those environments, also:\n\n![Backfill beta](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-10-backfix-beta.png)\n\n![Backfill stagign](https://raw.githubusercontent.com/kkinder/brancher/master/docs/ss-11-backfix-staging.png)\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Manage git workflow between multiple branches",
    "version": "1.2.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "67e6afdc50e13fe75f8c3807b3d929ff227244f9a1e314319822a96f3cb6119b",
                "md5": "84e6a389999a6788664571b7c038107f",
                "sha256": "146bc6f6785f63becbe10f15110e789f5afd0d1f150aa249cf5ccfdb6a315993"
            },
            "downloads": -1,
            "filename": "gitbrancher-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "84e6a389999a6788664571b7c038107f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 5998,
            "upload_time": "2024-06-26T15:16:02",
            "upload_time_iso_8601": "2024-06-26T15:16:02.632256Z",
            "url": "https://files.pythonhosted.org/packages/67/e6/afdc50e13fe75f8c3807b3d929ff227244f9a1e314319822a96f3cb6119b/gitbrancher-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ec6daad700db0700e9845c3eeab0b634aab587b5f556daefc62484a96594a78",
                "md5": "e7231f3f566b680dc85858f07d83a30a",
                "sha256": "6a39400f27c78b4000af12ae223110ecb0676dda52872a175dda909b68563083"
            },
            "downloads": -1,
            "filename": "gitbrancher-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e7231f3f566b680dc85858f07d83a30a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 5759,
            "upload_time": "2024-06-26T15:16:05",
            "upload_time_iso_8601": "2024-06-26T15:16:05.394650Z",
            "url": "https://files.pythonhosted.org/packages/0e/c6/daad700db0700e9845c3eeab0b634aab587b5f556daefc62484a96594a78/gitbrancher-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-26 15:16:05",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "gitbrancher"
}
        
Elapsed time: 0.27207s