GIT-ABSORB(1)
π git-absorb β the manual, but make it make sense
okay so bestie, welcome to the git absorb page β that's the git absorb manual, section 1, and honestly? it's a whole vibe. let's get into it β¨
πΈ NAME
git-absorb β automatically absorb staged changes into your current branch π«Ά
π¦ SYNOPSIS
git absorb [FLAGS] [OPTIONS]
π DESCRIPTION
okay imagine this: you've got a feature branch with a few commits. your teammate reviews it and is like "hey bestie, a couple bugs" π. you fix them β iconic β but now what? you do NOT want to shove all those fixes into one opaque commit literally called fixes, because you believe in atomic commits. periodt. π
so instead of manually hunting down commit SHAs for git commit --fixup, or running a manual interactive rebase (exhausting, lowkey), you do this:
$ git add $FILES_YOU_FIXED
$ git absorb --and-rebase
(or)
$ git absorb
$ git rebase -i --autosquash master
git absorb will automatically figure out which commits are safe to modify, and which indexed changes belong to each of those commits. then it writes fixup! commits for each of those changes. main character energy fr. π₯
you can check its output manually if you don't trust it (fair, honestly), and then fold the fixups into your feature branch with git's built-in autosquash functionality. ate. π
β¨ FLAGS β¨
-r,--and-rebaseβ run rebase if successful. also see theREBASE_OPTIONSbelow, iykyk π-n,--dry-runβ don't make any actual changes π--no-limitβ remove the absorb stack limit. has no effect when used with--base
this will consider all commits until either root, merge commit, or a commit by another author (unless --force-author is used)
which is why you should be careful when using this flag β οΈ genuinely, be careful.
--force-authorβ generate fixups to commits not made by you π--force-detachβ generate fixups even when on a non-branch (detached) HEAD π-F,--one-fixup-per-commitβ only generate one fixup per commit-f,--forceβ skip all safety checks as if all the--force-*flags were given. see those flags to understand the full effect of supplying--forceπ (yes, the whole effect. go read them.)-s,--squashβ create squash commits instead of fixup commits.
when this flag is used, "fixup commit" may be read as "squash commit" throughout the documentation. all configuration relating to fixup commits will apply to the squash commits instead. π§
-w,--whole-fileβ match the first commit touching the same file as the current hunk. use this with care! β οΈ-h,--helpβ prints help information-V,--versionβ prints version information-v,--verboseβ display more output π£οΈ
π OPTIONS π
-b <base>,--base <base>β use this commit as the base of the absorb stack-m <MESSAGE>,--message <MESSAGE>β a simple commit message body that will be used for all generated fixup commits. βοΈ--gen-completions <SHELL>β generate completions [possible values:bash,fish,nushell,zsh,powershell,elvish] π-- <REBASE_OPTIONS>β options to pass togit rebaseafter generating commits. must be the last arguments and the--must be present. only valid when--and-rebaseis used. π«Ά
π¦ USAGE
git addany changes that you want to absorb. by design,git absorbwill only consider content in the git index.git absorb. this will create a sequence of commits on HEAD. each commit will have afixup!message indicating the message (if unique) or SHA of the commit it should be squashed into. β¨- if you're satisfied with the output,
git rebase -i --autosquashto squash thefixup!commits into their predecessors. you can set theGIT_SEQUENCE_EDITORenvironment variable if you don't need to edit the rebase TODO file. π - if you're not satisfied (or if something bad happened π),
git reset --soft PRE_ABSORB_HEADto the pre-absorption commit to recover your old state. (you can also find the commit in question withgit reflog.) and if you thinkgit absorbis at fault, please file an issue. π«Ά
π CONFIGURATION
π STACK SIZE
when run without --base, git-absorb will only search for candidate commits to fixup within a certain range (by default 10). if you get an error like this:
WARN stack limit reached, limit: 10
edit your local or global .gitconfig and add the following section:
[absorb]
maxStack=50 # Or any other reasonable value for your project
stack size can also be disabled temporarily for one command (see --no-limit) π
πΈ ONE FIXUP PER FIXABLE COMMIT
by default, git-absorb will generate separate fixup commits for every absorbable hunk. to always generate only 1 fixup commit for all hunks that absorb into the same commit, edit your local or global .gitconfig and add the following section:
[absorb]
oneFixupPerCommit = true
π§ AUTO-STAGE ALL CHANGES IF NOTHING STAGED
by default, git-absorb will only consider files that you've staged to the index via git add. however, sometimes one wants to try and absorb from all changes, which would require to stage them first via git add .. to avoid this extra step, set
[absorb]
autoStageIfNothingStaged = true
which tells git-absorb, when no changes are staged, to auto-stage them all, create fixup commits where possible, and unstage remaining changes from the index. π
β FIXUP TARGET ALWAYS SHA
by default, git-absorb will create fixup commits with their messages pointing to the target commit's summary, and if there are duplicate summaries, will fall back to pointing to the target's SHA. instead, can always point to the target's SHA via:
[absorb]
fixupTargetAlwaysSHA = true
π GENERATE FIXUPS FOR COMMITS NOT AUTHORED BY YOU
by default, git-absorb will only generate fixup commits for commits that were authored by you. to always generate fixups for any author's commits, edit your local or global .gitconfig and add the following section:
[absorb]
forceAuthor = true
π GENERATE FIXUPS ON DETACHED HEAD
by default, git-absorb will not generate fixup commits when HEAD is not a branch ("is detached"). to always generate fixups on detached HEADs, edit your local or global .gitconfig and add the following section:
[absorb]
forceDetach = true
π₯ GENERATE SQUASH COMMITS INSTEAD OF FIXUPS
by default, git-absorb will generate fixup commits. to instead generate squash commits, edit your local or global .gitconfig and add the following section:
[absorb]
createSquashCommits = true
when this option is set, "fixup commit" may be read as "squash commit" throughout the documentation. all configuration relating to fixup commits will apply to the squash commits instead. π§
π GITHUB PROJECT
https://github.com/tummychow/git-absorb
π AUTHOR
Stephen Jung <tummychow511@gmail.com>
and that's the whole page bestie, no cap π
okay so this was git-absorb, dated 03/07/2026, manual page GIT-ABSORB(1) β go forth and absorb, you absolute icon, mwah π«Άπ
β¨
π¦ where this page comes from
- alpine 3.24: git-absorb-doc 0.9.0-r0 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms