git-branchless-move(1)

๐Ÿ“ฆ
version 0.11.1 ยท 2 versions
, in arch rolling, nixpkgs unstable

๐Ÿ’… move โ€” git-branchless-move(1) ๐Ÿ’…

okay bestie, welcome to the git-branchless-move(1) page from the General Commands Manual โ€” itโ€™s giving โ€œrelocate your whole commit stackโ€ energy and honestly? iconic. ๐Ÿซถ


๐ŸŒธ NAME ๐ŸŒธ

move โ€” Move a subtree of commits from one location to another. literally picking up your little commit family and moving it somewhere new ๐Ÿ’–


โœจ SYNOPSIS โœจ

move [-s|--source] [-b|--base] [-x|--exact] [-d|--dest] [--hidden]
[-f|--force-rewrite] [--in-memory] [--on-disk]
[--no-deduplicate-commits] [-m|--merge] [--reparent]
[--debug-dump-rebase-constraints] [--debug-dump-rebase-plan]
[-F|--fixup] [-I|--insert] [--dry-run] [-h|--help]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Move a subtree of commits from one location to another. thatโ€™s the whole mission, and it ate ๐Ÿ’…

By default, git move tries to move the entire current stack if you donโ€™t pass a --source or --base option โ€” thatโ€™s equivalent to writing --base HEAD, iykyk.

By default, git move attempts to rebase all commits in-memory. If you want to force an on-disk rebase, pass the --on-disk flag. Note: post-commit hooks are not called during in-memory rebases. no cap, thatโ€™s important ๐ŸŽ€


๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

  • -s, --source <SOURCE> โ€” The source commit to move. This commit, and all of its descendants, will be moved. the whole little family tree comes with it ๐ŸŒณ
  • -b, --base <BASE> โ€” A commit inside a subtree to move. The entire subtree, starting from the main branch, will be moved, not just the commits descending from this commit. so itโ€™s not just the direct kids โ€” the whole branch situation gets relocated ๐Ÿ’ซ
  • -x, --exact <EXACT> โ€” A set of specific commits to move. These will be removed from their current locations and any unmoved children will be moved to their nearest unmoved ancestor. very โ€œpick meโ€ behavior, but for commits ๐ŸŽฏ
  • -d, --dest <DEST> โ€” The destination commit to move all source commits onto. If not provided, defaults to the current commit. so if you donโ€™t choose a destination, it just says โ€œcurrent commit, youโ€™re the main character nowโ€ ๐Ÿ‘‘
  • --hidden โ€” Include hidden commits in the results of evaluating revset expressions. the hidden girlies get to show up to the function ๐Ÿ™ˆ
  • -f, --force-rewrite โ€” Force moving public commits, even though other people may have access to those commits.
โš ๏ธ okay so this one is literally called โ€œforceโ€ for a reason โ€” public commits are public, bestie. move them only if youโ€™re ready for the consequences ๐Ÿ’€
  • --in-memory โ€” Only attempt to perform an in-memory rebase. If it fails, do not attempt an on-disk rebase. itโ€™s giving โ€œin-memory or nothingโ€ โœจ
  • --on-disk โ€” Skip attempting to use an in-memory rebase, and try an on-disk rebase directly. straight to disk, no in-memory warm-up ๐Ÿ’…
  • --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. so yes, it can absolutely let the duplicate little guys through ๐Ÿซถ
  • -m, --merge โ€” Attempt to resolve merge conflicts, if any. If a merge conflict occurs and this option is not set, the operation is aborted. no --merge, no conflict-resolution fantasy โ€” it just stops ๐Ÿ˜ญ
  • --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.
โš ๏ธ use with care, fr fr โ€” far-away branches can drag unintended changes onto the destination like an overpacked suitcase ๐Ÿงณ
  • --debug-dump-rebase-constraints โ€” Debugging option. Print the constraints used to create the rebase plan before executing it. nerdy and useful, we love her ๐Ÿ”
  • --debug-dump-rebase-plan โ€” Debugging option. Print the rebase plan that will be executed before executing it. preview the plan before the plan does its thing ๐Ÿ‘€
  • -F, --fixup โ€” Combine the moved commits and squash them into the destination commit. tiny commits go in, one destination commit comes out ๐Ÿ“
  • -I, --insert โ€” Insert the subtree between the destination and itโ€™s children, if any. Only supported if the moved subtree has a single head. single head only, bestie โ€” thatโ€™s the rule ๐Ÿ’ซ
  • --dry-run โ€” Test whether an in-memory rebase would succeed. a little rehearsal before the real performance ๐ŸŽญ
  • -h, --help โ€” Print help (see a summary with '-h'). the classic โ€œhelp me help youโ€ moment ๐Ÿ’–

okay thatโ€™s the whole manual, bestie โ€” go move that subtree like the main character you are ๐Ÿ’… source/version: git-branchless-move(1) from the General Commands Manual; date: the footer didnโ€™t give us a separate date stamp, so thatโ€™s the sign-off vibe ๐ŸŽ€โœจ

๐Ÿ“ฆ where this page comes from