Skip to content

realmaxc/gitpal

Repository files navigation

gitpal

CI Go Reference Go Report Card License: MIT

A friendly helper for the everyday git chores that don't quite deserve their own alias but add up over a day: hopping between branches, tidying up commits, keeping a stack of small branches in order, and glancing at whether a branch is ready to become a pull request.

gitpal never replaces git — it shells out to the git you already have and wraps the fiddly parts in a calmer interface.

$ gitpal status
on branch feature/search
  tracking origin/feature/search  ahead 2, behind 0
  staged 1 · modified 3 · untracked 0 · conflicts 0

PR readiness
  ✓ on a feature branch (not main)
  ✓ no merge conflicts
  ✓ upstream branch configured
  ✗ working tree is clean
  ✗ all local commits pushed

not PR-ready yet

Install

go install github.com/realmaxc/gitpal/cmd/gitpal@latest

Or grab a prebuilt binary from the releases page.

Commands

Command Alias What it does
gitpal status st Compact, PR-ready status view with a readiness checklist.
gitpal switch sw Pick a branch to check out (uses fzf when available).
gitpal commit ci Stage and record a tidy commit; --wip for quick checkpoints.
gitpal amend Amend the last commit, with a guard against rewriting pushed history.
gitpal stack Create and inspect stacks of dependent branches.
gitpal version Print version information.

Run gitpal <command> -h for the flags each command accepts.

Why

I kept typing the same handful of git incantations dozens of times a day and wanted something that remembered the boring parts for me — especially the "is this branch actually ready to open a PR?" question. gitpal is that something.

See docs/usage.md for a tour and docs/architecture.md for how it fits together.

Configuration

gitpal reads a couple of optional settings, in order of precedence:

  1. Environment variables: GITPAL_TRUNK, GITPAL_COLOR (auto/always/never).
  2. git config: gitpal.trunk, gitpal.color.
  3. Sensible defaults (trunk is auto-detected from main/master).

Colored output honors NO_COLOR.

Contributing

Bug reports and small PRs are very welcome — see CONTRIBUTING.md.

License

MIT © Max Collins. See LICENSE.

About

a git workflow helper CLI written in Go that streamlines everyday chores: interactive branch switching, tidy commit/amend flows, stacked-branch helpers, and a compact PR-ready status view

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages