Skip to content

About

NPM - CLI tools implementing OneFlow git branching model

Topics

Resources

Contributing

Stars

16 stars

Watchers

3 watching

Forks

Repository files navigation

git-OneFlow

npm License: MIT

Start and finish feature, release and hotfix branches with gof or git-oneflow. The CLI implements Adam Ruka’s OneFlow Git workflow with either a single main branch or separate main and development branches.

git-OneFlow is in maintenance mode. For a native CLI with additional workflow models, see Twigsmith.

Install

Install Git and use the latest patch of a maintained Node.js LTS line or a newer stable release that is still supported. The package requires Node.js 22.23.4 or later in the 22 line, 24.22.2 or later in the 24 line, or 26.13.0 and above, and npm 10 or newer.

npm install -g git-oneflow
gof --help

Both gof and git-oneflow run the same command. To view help without a global installation, use npx git-oneflow --help. Use npm install -g git-oneflow@next to install the version on the pre-release channel.

Try a feature branch

In a trusted Git repository with a local main branch and the default configuration, preview the branch creation, then run it.

gof start feature my-feature --dry-run
gof start feature my-feature

The second command checks out feature/my-feature. After committing your feature changes, integrate them into main locally. This rebases the feature branch, so review Git's guidance for shared branches if others use its commits.

gof finish feature my-feature --no-interactive --no-push --no-delete

The command leaves you on main and keeps the feature branch. With the default options, finishing instead uses interactive rebase, pushes to origin, deletes the local feature branch and prompts to delete its remote counterpart.

See the usage guide for release and hotfix workflows, configuration, command options and recovery. Git workflows are tested on Linux, macOS and Windows. The project has yet to establish a minimum Git version.

Twigsmith

Twigsmith 1.0 is the Rust successor to git-OneFlow. Consider it for native executables or configurable OneFlow, GitHub Flow, GitFlow and lightweight trunk workflows, including supported direct integration and hosted review routes.

Twigsmith has a different interface and configuration model:

  • Installation: install the separate npm package with npm install -g twigsmith@1.0.0, or download a native archive. Native downloads need neither Node.js nor Rust. Check Twigsmith's platform and npm installer requirements, including Git 2.45+.
  • Configuration: use tgi config to choose and edit workflow settings; .git-oneflowrc is not imported. Bundles generate ordinary twigsmith.config.toml, YAML or JSON settings.
  • Commands: invoke twigsmith or tgi; it installs no git-oneflow or gof aliases. Use tgi start feature/my-feature and tgi finish for the current branch. Release/hotfix policy is explicit, not inferred from a prefix.
  • Migration: update scripts and aliases for the new commands and options. Existing git-oneflow/gof shell-completion registrations are preserved; remove them manually only when no longer needed.

Read the migration guide before switching.

Project links

About

NPM - CLI tools implementing OneFlow git branching model

Topics

Resources

Contributing

Stars

16 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages