Skip to content

Latest commit

 

History

History
78 lines (57 loc) · 2.3 KB

File metadata and controls

78 lines (57 loc) · 2.3 KB

Usage

gitpal groups a handful of everyday chores under short subcommands. Nothing here is magic — each command maps onto a small number of git invocations.

status (st)

A compact snapshot plus a PR-readiness checklist:

$ 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

Add -v to list the changed files grouped by category (staged, modified, untracked, renamed, conflict).

switch (sw)

With no arguments, gitpal lists your branches newest-first and lets you pick one:

$ gitpal switch

If fzf is installed you get a fuzzy finder; otherwise a numbered menu. You can also switch directly or create a branch:

$ gitpal switch main          # check out an existing branch
$ gitpal switch -c feature/x  # create and switch
$ gitpal switch --remote      # include remote-tracking branches in the list

commit (ci)

$ gitpal commit -m "fix parser edge case"   # commit staged changes
$ gitpal commit -a -m "tidy up"             # stage tracked changes first
$ gitpal commit --wip                       # quick "wip" checkpoint of everything

gitpal refuses to create an empty commit and tells you how many changes it is about to record.

amend

$ gitpal amend --no-edit           # fold staged changes into the last commit
$ gitpal amend -m "better message" # reword the last commit

If the last commit already appears on its upstream, gitpal refuses unless you pass --force, so you don't rewrite published history by accident.

stack

Stacks are chains of dependent branches. gitpal records each branch's parent in git config, so the relationship travels with the repository.

$ gitpal stack new feature/api      # branch off the current branch, remember the parent
$ gitpal stack new feature/web      # stack another branch on top
$ gitpal stack                      # show the stack, base first
$ gitpal stack parent               # print the current branch's parent
$ gitpal stack sync                 # rebase the current branch onto its parent