.\" Man page generated from reStructuredText. . .TH "GIT-REVISE" "1" "Jan 05, 2022" "0.7.0" "git-revise" .SH NAME git-revise \- Efficiently update, split, and rearrange git commits . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fIgit revise\fP [] [] .SH DESCRIPTION .sp \fBgit revise\fP is a \fBgit(1)\fP subcommand to efficiently update, split, and rearrange commits. It is heavily inspired by \fBgit\-rebase(1)\fP, however tries to be more efficient and ergonomic for patch\-stack oriented workflows. .sp By default, \fBgit revise\fP will apply staged changes to , updating \fBHEAD\fP to point at the revised history. It also supports splitting commits, rewording commit messages. .sp Unlike \fBgit\-rebase(1)\fP, \fBgit revise\fP avoids modifying working directory and index state, performing all merges in\-memory, and only writing them when necessary. This allows it to be significantly faster on large codebases, and avoid invalidating builds. .sp If \fI\%\-\-autosquash\fP or \fI\%\-\-interactive\fP is specified, the argument may be omitted or given as the special value \fI:option:\-\-root\fP\&. If it is omitted, \fBgit revise\fP will consider a range of unpublished commits on the current branch. If given as \fI:option:\-\-root\fP, all commits including the root commit will be considered. .SH OPTIONS .SS General options .INDENT 0.0 .TP .B \-a, \-\-all Stage changes to tracked files before revising. .UNINDENT .INDENT 0.0 .TP .B \-p, \-\-patch Interactively stage hunks from the worktree before revising. .UNINDENT .INDENT 0.0 .TP .B \-\-no\-index Ignore staged changes in the index. .UNINDENT .INDENT 0.0 .TP .B \-\-reauthor Reset target commit\(aqs author to the current user. .UNINDENT .INDENT 0.0 .TP .B \-\-ref Working branch to update; defaults to \fBHEAD\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-S, \-\-gpg\-sign, \-\-no\-gpg\-sign GPG\-sign commits. Overrides both the \fBcommit.gpgSign\fP and \fBrevise.gpgSign\fP git configurations. .UNINDENT .SS Main modes of operation .INDENT 0.0 .TP .B \-i, \-\-interactive Rather than applying staged changes to , edit a todo list of actions to perform on commits after . See \fI\%INTERACTIVE MODE\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-autosquash, \-\-no\-autosquash Rather than directly applying staged changes to , automatically perform fixup or squash actions marked with \fBfixup!\fP or \fBsquash!\fP between and the current \fBHEAD\fP\&. For more information on what these actions do, see \fI\%INTERACTIVE MODE\fP\&. .sp These commits are usually created with \fBgit commit \-\-fixup=\fP or \fBgit commit \-\-squash=\fP, and identify the target with the first line of its commit message. .sp This option can be combined with \fI\%\-\-interactive\fP to modify the generated todos before they\(aqre executed. .sp If the \fI\%\-\-autosquash\fP option is enabled by default using a configuration variable, the option \fI\%\-\-no\-autosquash\fP can be used to override and disable this setting. See \fI\%CONFIGURATION\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-c, \-\-cut Interactively select hunks from . The chosen hunks are split into a second commit immediately after the target. .sp After splitting is complete, both commits\(aq messages are edited. .sp See the "Interactive Mode" section of \fBgit\-add(1)\fP to learn how to operate this mode. .UNINDENT .INDENT 0.0 .TP .B \-e, \-\-edit After applying staged changes, edit \(aqs commit message. .sp This option can be combined with \fI\%\-\-interactive\fP to allow editing of commit messages within the todo list. For more information on, see \fI\%INTERACTIVE MODE\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-m , \-\-message Use the given as the new commit message for . If multiple \fI\%\-m\fP options are given, their values are concatenated as separate paragraphs. .UNINDENT .INDENT 0.0 .TP .B \-\-version Print version information and exit. .UNINDENT .SH CONFIGURATION .sp Configuration is managed by \fBgit\-config(1)\fP\&. .INDENT 0.0 .TP .B revise.autoSquash If set to true, imply \fI\%\-\-autosquash\fP whenever \fI\%\-\-interactive\fP is specified. Overridden by \fI\%\-\-no\-autosquash\fP\&. Defaults to false. If not set, the value of \fBrebase.autoSquash\fP is used instead. .UNINDENT .INDENT 0.0 .TP .B revise.gpgSign If set to true, GPG\-sign new commits; defaults to false. This setting overrides the original git configuration \fBcommit.gpgSign\fP and may be overridden by the command line options \fB\-\-gpg\-sign\fP and \fB\-\-no\-gpg\-sign\fP\&. .UNINDENT .SH CONFLICT RESOLUTION .sp When a conflict is encountered, \fBgit revise\fP will attempt to resolve it automatically using standard git mechanisms. If automatic resolution fails, the user will be prompted to resolve them manually. .sp There is currently no support for using \fBgit\-mergetool(1)\fP to resolve conflicts. .sp No attempt is made to detect renames of files or directories. \fBgit revise\fP may produce suboptimal results across renames. Use the interactive mode of \fBgit\-rebase(1)\fP when rename tracking is important. .SH NOTES .sp A successful \fBgit revise\fP will add a single entry to the reflog, allowing it to be undone with \fBgit reset @{1}\fP\&. Unsuccessful \fBgit revise\fP commands will leave your repository largely unmodified. .sp No merge commits may occur between the target commit and \fBHEAD\fP, as rewriting them is not supported. .sp See \fBgit\-rebase(1)\fP for more information on the implications of modifying history on a repository that you share. .SH INTERACTIVE MODE .sp \fBgit revise\fP supports an interactive mode inspired by the interactive mode of \fBgit\-rebase(1)\fP\&. .sp This mode is started with the last commit you want to retain "as\-is": .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C git revise \-i .ft P .fi .UNINDENT .UNINDENT .sp The special target \fI\-\-root\fP is available to revise everything up to the root commit: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C git revise \-i \-\-root .ft P .fi .UNINDENT .UNINDENT .sp 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 \fB\fP entry will also be present. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C pick 8338dfa88912 Oneline summary of first commit pick 735609912343 Summary of second commit index 672841329981 .ft P .fi .UNINDENT .UNINDENT .sp These commits may be re\-ordered to change the order they appear in history. In addition, the \fBpick\fP and \fBindex\fP commands may be replaced to modify their behaviour. If present, \fBindex\fP commands must be at the bottom of the list, i.e. they can not be followed by non\-index commands. .sp If \fI\%\-e\fP was specified, the full commit message will be included, and each command line will begin with a \fB++\fP\&. 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. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C ++ pick 8338dfa88912 Oneline summary of first commit Body of first commit ++ pick 735609912343 Summary of second commit Body of second commit ++ index 672841329981 .ft P .fi .UNINDENT .UNINDENT .sp The following commands are supported in all interactive modes: .INDENT 0.0 .TP .B index Do not commit these changes, instead leaving them staged in the index. Index lines must come last in the file. .UNINDENT .INDENT 0.0 .TP .B pick Use the given commit as\-is in history. When applied to the generated \fBindex\fP entry, the commit will have the message \fB\fP\&. .UNINDENT .INDENT 0.0 .TP .B squash Add the commit\(aqs changes into the previous commit and open an editor to merge the commits\(aq messages. .UNINDENT .INDENT 0.0 .TP .B fixup Like squash, but discard this commit\(aqs message rather than editing. .UNINDENT .INDENT 0.0 .TP .B reword Open an editor to modify the commit message. .UNINDENT .INDENT 0.0 .TP .B cut Interactively select hunks from the commit. The chosen hunks are split into a second commit immediately after it. .sp After splitting is complete, both commits\(aq messages are edited. .sp See the "Interactive Mode" section of \fBgit\-add(1)\fP to learn how to operate this mode. .UNINDENT .SH REPORTING BUGS .sp Please report issues and feature requests to the issue tracker at \fI\%https://github.com/mystor/git\-revise/issues\fP\&. .sp Code, documentation and other contributions are also welcomed. .SH SEE ALSO .sp \fBgit(1)\fP \fBgit\-rebase(1)\fP \fBgit\-add(1)\fP .SH COPYRIGHT 2018-2022, Nika Layzell .\" Generated by docutils manpage writer. .