talira

git-absorb

git commit --fixup, but automatic

open sourceBSD-3-Clauseself-hostablefree

git-absorb is a port of Mercurial's hg absorb. Given staged changes on a feature branch, it works out which earlier commits touched the same lines and writes fixup! commits for each, optionally rebasing them in with --and-rebase. It is handy for applying review feedback while keeping atomic commits.

Ways to install

Problems it solves

  • applying review feedback to the right commits in my branch is tedious
  • I keep looking up commit SHAs to run git commit --fixup
  • fold small fixes into the earlier commits they belong to automatically
  • keep atomic commits without a manual interactive rebase
  • I do not want a single "fix review comments" commit at the end of my PR
  • automatically figure out which commit last modified these lines and amend it
  • cleaning up a stacked branch history after code review
  • hg absorb for git

Features

  • automatic fixup commits
  • --and-rebase
  • works with autosquash

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what git-absorb does.

  1. Jujutsu (jj) A Git-compatible VCS that is both simple and powerful
  2. GitButler Version control for your agents
  3. lazygit simple terminal UI for git commands

Compare git-absorb with the top 3