GIT-REVISE(1)
π GIT-REVISE(1) β the git-revise glow-up guide β¨
okay bestie, welcome to git-revise π β it's the git(1) subcommand from the git-revise manual, and honestly? it's giving main character energy for your patch stacks.
β¨ NAME β¨
git-revise β efficiently update, split, and rearrange git commits π
π¦ SYNOPSIS π¦
git revise [<options>] [<target>]
πΈ DESCRIPTION πΈ
So git revise is a git(1) subcommand that lets you efficiently update, split, and rearrange commits π₯. It's heavily inspired by git-rebase(1), but it tries so hard to be more efficient and ergonomic for patch-stack oriented workflows. And ngl, it ate. π
By default, git revise will apply staged changes to <target>, updating HEAD to point at the revised history. It also supports splitting commits and rewording commit messages. Obsessed.
Unlike git-rebase(1), git revise avoids modifying working directory and index state β it does all its merges in-memory, and only writes them out when necessary π§. That's the whole slay: it's significantly faster on large codebases, and it avoids invalidating builds. No cap.
If --autosquash or --interactive is specified, the <target> argument may be omitted, or given as the special value --root π. If it's omitted, git revise will consider a range of unpublished commits on the current branch. If it's given as --root, all commits including the root commit will be considered. Big main character energy.
π OPTIONS π
π General options π
-a,--allβ stage changes to tracked files before revising β¨-p,--patchβ interactively stage hunks from the worktree before revising π--no-indexβ ignore staged changes in the index, like, pretend they're not there π--reauthorβ reset the target commit's author to the current user π--ref <gitref>β the working branch to update; defaults toHEADβ-S,--gpg-sign,--no-gpg-signβ GPG-sign commits π. This overrides both thecommit.gpgSignandrevise.gpgSigngit configurations.
π₯ Main modes of operation π₯
-i,--interactiveβ rather than applying staged changes to<target>, edit a todo list of actions to perform on commits after<target>π¦. See INTERACTIVE MODE.--autosquash,--no-autosquashβ rather than directly applying staged changes to<target>, automatically performfixuporsquashactions marked withfixup!orsquash!between<target>and the currentHEADπ. For more info on what these actions do, see INTERACTIVE MODE.
These commits are usually created with git commit --fixup=<commit> or git commit --squash=<commit>, and they identify the target with the first line of its commit message. iykyk.
This option can be combined with --interactive to modify the generated todos before they're executed π
.
If the --autosquash option is enabled by default using a configuration variable, the option --no-autosquash can be used to override and disable this setting. See CONFIGURATION.
-c,--cutβ interactively select hunks from<target>βοΈ. The chosen hunks are split into a second commit immediately after the target.
After splitting is complete, both commits' messages are edited.
See the "Interactive Mode" section of git-add(1) to learn how to operate this mode π«Ά.
-e,--editβ after applying staged changes, edit<target>'s commit message π.
This option can be combined with --interactive to allow editing of commit messages within the todo list. For more information, see INTERACTIVE MODE.
-m <msg>,--message <msg>β use the given<msg>as the new commit message for<target>π. If multiple-moptions are given, their values are concatenated as separate paragraphs.--versionβ print version information and exit π
π CONFIGURATION π
Configuration is managed by git-config(1) β¨.
revise.autoSquashβ if set totrue, imply--autosquashwhenever--interactiveis specified. Overridden by--no-autosquash. Defaults tofalse. If it's not set, the value ofrebase.autoSquashis used instead π¦.revise.gpgSignβ if set totrue, GPG-sign new commits; defaults tofalse. This setting overrides the original git configurationcommit.gpgSign, and may be overridden by the command line options--gpg-signand--no-gpg-signπ.
π CONFLICT RESOLUTION π
When a conflict is encountered, git revise will attempt to resolve it automatically using standard git mechanisms π§. If automatic resolution fails, the user will be prompted to resolve them manually. You got this, bestie π«Ά.
There's currently no support for using git-mergetool(1) to resolve conflicts π.
No attempt is made to detect renames of files or directories. git revise may produce suboptimal results across renames. Use the interactive mode of git-rebase(1) when rename tracking is important β that's the vibe check here β.
π NOTES π
A successful git revise will add a single entry to the reflog, allowing it to be undone with git reset @{1} π. Unsuccessful git revise commands will leave your repository largely unmodified. We love a safe queen.
π¨ No merge commits may occur between the target commit and HEAD, because rewriting them is not supported. periodt.
See git-rebase(1) for more information on the implications of modifying history on a repository that you share π.
π INTERACTIVE MODE π
git revise supports an interactive mode inspired by the interactive mode of git-rebase(1) π.
This mode is started with the last commit you want to retain "as-is":
git revise -i <after-this-commit>
The special target --root is available to revise everything up to the root commit:
git revise -i --root
An editor will be fired up with the commits in your current branch after the given commit π. If the index has any staged but uncommitted changes, a <git index> entry will also be present:
pick 8338dfa88912 Oneline summary of first commit
pick 735609912343 Summary of second commit
index 672841329981 <git index>
These commits may be re-ordered to change the order they appear in history π. In addition, the pick and index commands may be replaced to modify their behaviour. If present, index commands must be at the bottom of the list, i.e. they can not be followed by non-index commands.
If -e was specified, the full commit message will be included, and each command line will begin with ++ β¨. Any changes made to the commit messages in this file will be applied to the commit in question, allowing for simultaneous editing of commit messages during the todo editing phase. Iconic.
++ pick 8338dfa88912
Oneline summary of first commit
Body of first commit
++ pick 735609912343
Summary of second commit
Body of second commit
++ index 672841329981
<git index>
The following commands are supported in all interactive modes π :
indexβ Do not commit these changes, instead leaving them staged in the index.indexlines must come last in the file. πpickβ Use the given commit as-is in history. When applied to the generated index entry, the commit will have the message<git index>. βsquashβ Add the commit's changes into the previous commit and open an editor to merge the commits' messages. π«Άfixupβ Likesquash, but discard this commit's message rather than editing. πrewordβ Open an editor to modify the commit message. πcutβ Interactively select hunks from the commit. The chosen hunks are split into a second commit immediately after it. βοΈ
After splitting is complete, both commits' messages are edited.
See the "Interactive Mode" section of git-add(1) to learn how to operate this mode.
π REPORTING BUGS π
Please report issues and feature requests to the issue tracker at https://github.com/mystor/git-revise/issues π.
Code, documentation and other contributions are also welcomed β come thru, bestie! π«Ά
π SEE ALSO π
git(1) git-rebase(1) git-add(1)
π COPYRIGHT π
2018-2026, Nika Layzell
and that's the tea, bestie π β this was git-revise version 0.8.0, dated Feb 22, 2026, and it's gonna eat every single time ππ
β¨
π¦ where this page comes from
- arch rolling: git-revise 0.8.0-2 Β· MIT
- nixpkgs unstable: python3.13-git-revise 0.8.0
- nixpkgs unstable: python3.14-git-revise 0.8.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms