gitflow-branch-manager
v1.0.1
Published
Git branch manager with conflict detection and merge branch automation
Readme
gitflow-branch-manager
Git branch manager with conflict detection and automatic merge branch creation.
Install
npm i -g gitflow-branch-manager
# or
pnpm add -g gitflow-branch-managerRequires Node.js ≥ 18 and Git ≥ 2.38 (for git merge-tree).
Commands
gbranch create <type> <name>
Creates a new base branch from main/master.
gbranch create feat user-auth
gbranch create fix login-bug
gbranch create hotfix payment-errorValid types: feat fix hotfix feature bugfix
Creates: feat/user-auth/base tracked on the remote.
gbranch merge [type] [name]
Checks the base branch for conflicts against development/develop and staging. If a conflict is detected, creates a dedicated merge branch (base-merge-<env>) so the base stays clean.
gbranch merge feat user-auth
gbranch merge # auto-detects from current branchgbranch sync [type] [name]
Syncs existing merge branches with the latest base.
gbranch sync feat user-auth
gbranch sync # auto-detects from current branchBranch naming convention
<type>/<name>/base ← your working branch
<type>/<name>/base-merge-staging ← created on conflict with staging
<type>/<name>/base-merge-develop ← created on conflict with developFeatures
- Auto-detects
main/masteranddevelopment/develop - Auto-stashes uncommitted changes and restores on exit
- Interactive conflict resolution flow
- WSL warning when repo is on a Windows filesystem (
/mnt/) - Works on Linux, WSL, macOS, and Windows
