Git Clients

git-absorb – super-charging git rebase

git-absorb is a port of Facebook’s hg absorb. The command essentially looks at the lines that were modified, finds a changeset modifying those lines, and amends that changeset to include your uncommitted changes. If the changes can’t be made without conflicts, they remain uncommitted. This workflow is insanely useful for things like applying review feedback.

You have a feature branch with a few commits. Your teammate reviewed the branch and pointed out a few bugs. You have fixes for the bugs, but you don’t want to shove them all into an opaque commit that says fixes, because you believe in atomic commits. Instead of manually finding commit SHAs for git commit –fixup, or running a manual interactive rebase, do this:

git add $FILES_YOU_FIXED
git absorb --and-rebase

git absorb will automatically identify which commits are safe to modify, and which staged changes belong to each of those commits. It will then write fixup! commits for each of those changes.

With the --and-rebase flag, these fixup commits will be automatically integrated into the corresponding ones. Alternatively, you can check its output manually if you don’t trust it, and then fold the fixups into your feature branch with git’s built-in autosquash functionality:

git add $FILES_YOU_FIXED
git absorb
git log # check the auto-generated fixup commits
git rebase -i --autosquash master

This is free and open source software.

Website: github.com/tummychow/git-absorb
Support:
Developer: Stephen Jung
License: BSD 3-Clause “New” or “Revised” License

git-absorb is written in Rust. Learn Rust with our recommended free books and free tutorials


Related Software

Git Workflow Tools
git-extrasSuperb collection of tools for Git
forgitUtility for using git interactively
wrkflwValidate and run GitHub Actions workflows locally
git-branchlessBranchless workflow for git
git-absorbSuper-charging git rebase
git-toolbeltSuite of useful Git commands
git-openAdds a handy git open command to Git.
git-townAutomate the creation, synchronization, shipping, and cleanup
git-fuzzyInteractive git with the help of fzf
git-recentJump between recently used local Git branches
git-macheteRobust tool that simplifies your git workflows
git-flow-nextModern implementation of the Git-flow branching model
Git Interactive Rebase ToolTerminal-based sequence editor for interactive rebase
git-crecordInteractively select changes to commit or stage
git-xargsUpdate across multiple GitHub repositories
git-prompt.zshLightweight git prompt for zsh
git-imergeIncremental merge and rebase for Git
git reviseGit subcommand and Python library
wtpEnhanced Git worktree management
LazyWorktreeGit worktree management for the terminal
Hug SCMThe Humane Source Control Management Interface
git-smartSmall collection of Git helper commands
staxCLI and TUI for stacked Git branches and PRs
git-fixupCommand-line helper for Git users
git-autofixupGit helper that creates fixup commits for topic branches
BranchletCreate and manage Git worktrees
git-when-mergedMerge commit finder
git-flowHigh-level repository operations

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments