git-branchless-restack(1)
Hiiii bestie! π You're on the git-branchless-restack(1) page from the General Commands Manual, and this whole page is about restack β the command that fixes up commits abandoned by a previous rewrite operation. It's giving cleanup era, and honestly? We love that for us. Let's go. β¨
πΈ NAME πΈ
restack β Fix up commits abandoned by a previous rewrite operation.
β¨ SYNOPSIS β¨
restack [--hidden] [-f|--force-rewrite] [--in-memory] [--on-disk]
[--no-deduplicate-commits] [-m|--merge] [--reparent]
[--debug-dump-rebase-constraints] [--debug-dump-rebase-plan] [-h|--help]
[REVSETS]
π DESCRIPTION π
Okay so here's the tea: a previous rewrite operation can abandon commits, and restack is the bestie who swoops in to fix them up. That's literally the whole description: Fix up commits abandoned by a previous rewrite operation. Main character cleanup energy, no cap. π«Ά
π OPTIONS π
--hiddenβ Include hidden commits in the results of evaluating revset expressions. If your revset vibe check needs the hidden girlies, this flag says "bring 'em out." π-f,--force-rewriteβ Force moving public commits, even though other people may have access to those commits. This is the spicy one: it can move public commits, and other people may have access to those commits. You've been warned by the facts themselves. π--in-memoryβ Only attempt to perform an in-memory rebase. If it fails, do not attempt an on-disk rebase. So it's in-memory only, bestie β if that fails, there is no on-disk rebase fallback. π§--on-diskβ Skip attempting to use an in-memory rebase, and try an on-disk rebase directly. Straight to on-disk, no in-memory attempt at all. π--no-deduplicate-commitsβ Don't attempt to deduplicate commits. Normally, a commit with the same contents as another commit which has already been applied to the target branch is skipped. If set, this flag skips that check. Dedup? Not today. π-m,--mergeβ Attempt to resolve merge conflicts, if any. If a merge conflict occurs and this option is not set, the operation is aborted. So it tries to resolve merge conflicts if any, but if a merge conflict happens and you didn't set this? Operation aborted, periodt. π©--reparentβ Keep all contents of descendant commits exactly the same (i.e. "reparent" them). This can be useful when applying formatting or refactoring changes. Use with care if the descendants are moved from a far-away branch, as it may carry along a lot of unintended changes onto the destination. That last part is highkey important β use with care, because it may carry along a lot of unintended changes onto the destination. π«--debug-dump-rebase-constraintsβ Debugging option. Print the constraints used to create the rebase plan before executing it. π--debug-dump-rebase-planβ Debugging option. Print the rebase plan that will be executed before executing it. πΊοΈ-h,--helpβ Print help. That's it, that's the vibe. β¨[REVSETS](default:draft()) β The IDs of the abandoned commits whose descendants should be restacked. If not provided, all abandoned commits are restacked. So if you don't pass it, literally all abandoned commits get restacked. π
That's the whole page, bestie. Cute sign-off time: this was the git-branchless-restack(1) / restack manual page from the General Commands Manual, and the footer just gives you restack + git-branchless-restack(1) β no extra source/version or date info here, ngl. Now go fix up those abandoned commits and slay. π
πβ¨
π¦ where this page comes from
- arch rolling: git-branchless 0.11.1-2 Β· Apache-2.0 AND MIT
- nixpkgs unstable: git-branchless 0.11.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms