git-disjoint 0.2.18

A tool to batch commits into PRs on GitHub
git-disjoint-0.2.18 is not a library.

Git Disjoint

git disjoint groups commits by issue onto unique branches.

Installing

Cargo

cargo install git-disjoint

Manual

Download a release compatible with your OS and architecture from the Releases page, extract the binary, and put it somewhere in your $PATH.

Assumptions

git disjoint may add value to your workflow if you

  • use a work tracker (currently supports Jira)
  • use GitHub and Pull Requests

Goals

git disjoint automates referencing issues in your development work (Jira) so you can focus on development.

Workflow

  1. Add all your commits to one branch.

    Starting from your repository's default branch, this could look like:

    git checkout -b now
    

    or, if you are using git-branchless:

    git checkout --detach
    
  2. In each commit message, include a reference to the relevant ticket.

    For example:

    Ticket: COOL-123
    

    or

    Closes Ticket: COOL-123
    
  3. When you're ready to:

    1. turn the set of commits addressing each ticket into its own feature branch,
    2. push that branch, and
    3. create a draft PR,

    run git disjoint.

Caveats

  • There's currently no code to handle the case where git disjoint tries to operate on a branch that already exists. This can happen if you invoke git disjoint twice on the same branch. See #32.