gitterdone
v0.1.1
Published
A small Git branching workflow helper for GitHub Flow and Gitflow projects.
Maintainers
Readme
GitterDone
A tiny CLI tool for creating project branches that match the branching strategy stored in the project.
GitHub Flow is the default: main is the only long-lived branch, work branches from main, and changes return through pull requests after review and CI.
Install for local use
npm install
npm linkAfter linking, both commands are available:
gd help
gitterdone helpInitialize a project
From the root of a project:
gd initThis creates .gitterdone.json, initializes git for the selected strategy, and prompts to create the first commit when the repo has no commits yet.
For GitHub Flow, gd init ensures the project is a git repo on main.
For Gitflow, gd init ensures main exists and creates develop when the repo already has an initial commit.
To create the first commit without prompting while initializing a brand-new repo:
gd init --initial-commitYou can customize the commit message:
gd init --initial-commit --commit-message "Bootstrap project"For Gitflow in a brand-new repo, the initial commit lets gd init create develop immediately:
gd init --strategy gitflow --initial-commitTo skip prompts:
gd init --strategy github-flowTo write only the dotfile without changing git:
gd init --no-gitCreate a branch
Interactive mode:
gd branchNon-interactive mode:
gd branch --type feat --description "add user invites" --yesPreview without touching git:
gd branch --type fix --description "resolve login loop" --dry-rungd branch creates and checks out the branch for you. It also checks the configured strategy before branching:
- GitHub Flow work branches start from
main. - Gitflow feature/fix/chore/refactor/docs/test/perf/spike/release branches start from
develop. - Gitflow hotfix branches start from
main.
Use --base to override the base branch for a one-off branch:
gd branch --type fix --description "patch signup redirect" --base main --yesThe default branch types are:
feat/short-description
fix/short-description
chore/short-description
refactor/short-description
docs/short-description
test/short-description
perf/short-description
spike/short-description