/git-op

Git branching tool

Primary LanguageGoMIT LicenseMIT

git op logo

git-op

Git branching tool.

One line table of contents: Installing | Usage: Branch, Merge, Tag, Push.

Installing

Download your's OS/architecture binary into your $PATH from latest release page.

For linux/amd64:

sudo wget -O /usr/local/bin/git-op https://github.com/garex/git-op/releases/latest/download/git-op_linux_amd64 && sudo chmod +x /usr/local/bin/git-op

Usage

Shortest workflow is branch -> push.

Branch

git op branch [NAME] creates branch from 'master' named 'NAME'

When [NAME] is ommitted, it autogenerated like '2019-05-26-13-09'.

Merge

git op merge [NAME] merges branch 'NAME' into 'master'.

When [NAME] is ommitted, current branch is used. On 'master' branch it do nothing.

Default behavior pulls latest 'master' branch from 'origin' remote and rebases onto it. Tags are fetched too.

Tag

git op tag [VERSION] creates version as a tag.

Assume we have last tag '1.2.3'.

  • [VERSION] is ommited or 'patch' passed -- creates next 'patch' version: '1.2.4'.
  • 'minor' passed -- '1.3.0'.
  • 'major' passed -- '2.0.0'.

Default behavior calls git op merge before releasing.

Push

git op push push latest changes in 'master' with tags.

Default behavior calls git op tag before pushin, which will create patch version bump.