#git #gitflow

app git-flow-rs

Extensible git flow written in rust

7 unstable releases (3 breaking)

0.4.0 Feb 7, 2024
0.3.0 Nov 24, 2023
0.2.0 Nov 21, 2023
0.1.3 Nov 15, 2023

#293 in Command line utilities

Download history 61/week @ 2023-11-08 57/week @ 2023-11-15 41/week @ 2023-11-22 20/week @ 2023-11-29 12/week @ 2023-12-06 6/week @ 2023-12-13 7/week @ 2023-12-20 7/week @ 2023-12-27 6/week @ 2024-01-03 8/week @ 2024-01-24 18/week @ 2024-01-31 32/week @ 2024-02-07 91/week @ 2024-02-14

149 downloads per month

MIT license

47KB
1.5K SLoC

git-flow.rs

Extensible git flow written in rust.

Extensible: Customize the workflow that suits your preferences.

Follow configuration: Standardize team protocols.

Installation

cargo install git-flow-rs

Or download released binary.

Usage

git flow --help

Make sure that git command has been installed.

Usage: git-flow [OPTIONS] <COMMAND>

Commands:
  start   start a task
  finish  finish a task
  drop    drop a task
  track   track a task
  sync    sync branches
  list    list avaliable branch types
  check   check config
  help    Print this message or the help of the given subcommand(s)

Options:
  -c, --config <FILE>
  -h, --help           Print help
  -V, --version        Print version

A small example.

# start a feature
git flow start something feature
# or git flow start feature/something
# then branch feature/something created from dev

# implement the feature
# commit changes

# finish the feature
git flow finish feature/something
# then feature/something merged into dev and this branch deleted

Config

Global config file should be located at ~/.config/git-flow/config.toml(or C:\Users\YourUsername\AppData\Roaming\git-flow\config.toml on windows).

Local config file should be located at <GitRoot>/.git-flow.toml.

There is no default configuration. Here is an example.

Avaliable strategy: merge, rebase, cherry-pick.

Avaliable hook: before_start, after_start, before_finish, after_finish, before_drop, after_drop.

Regex is avaliable on to.n.name.

[[branch_types]]
name = "feature"
create = "feature/{NAME}"
from = "dev"
to = [{ name = "dev", strategy = "merge" }]
after_start = { command = "git", args = [
  "push",
  "origin",
  "feature/{NAME}:feature/{NAME}",
] }
after_finish = { command = "git", args = [
  "push",
  "origin",
  "--delete",
  "feature/{NAME}",
] }

[[branch_types]]
name = "hotfix"
create = "hotfix/{NAME}"
from = "main"
to = [
  { name = "main", strategy = "merge" },
  { name = "dev", strategy = "merge" },
  { name = "feature/*", strategy = "merge" },
]

[[branch_types]]
name = "bugfix"
create = "bugfix/{NAME}"
from = "dev"
to = [
  { name = "dev", strategy = "merge" },
  { name = "feature/*", strategy = "merge" },
]

[[branch_types]]
name = "release"
create = "release/{NAME}"
from = "dev"
to = [{ name = "main", strategy = "merge" }]

Dependencies

~7–16MB
~181K SLoC