stg-squash - Man Page
Squash two or more patches into one
Synopsis
stg squash [OPTIONS] <patch>...
Description
Squash two or more patches, creating one patch with their combined changes.
The squash process, at a high level:
- Pop all the given patches, plus any other patches on top of them.
- Push the given patches in the order they were given on the command line. This establishes a tree containing the combined changes from the given patches.
- Replace given patches with a new, squashed patch.
- Allow the user to interactively edit the commit message of the new, squashed patch.
- Push other patches that were popped in step (1), if any.
Conflicts can occur whenever a patch is pushed; this is, in steps (2) and (5). If conflicts occur, the squash command will halt such that the conflicts may be resolved manually.
Options
- -n <name>, --name=<name>
Use <name> for the squashed patch
- -e, --edit
Invoke editor for patch description
- -d, --diff
Show diff when editing patch description
- -m <message>, --message=<message>
Use message instead of invoking the editor
- -f <path>, --file=<path>
Use the contents of file instead of invoking the editor. Use "-" to read from stdin.
- --no-verify
Disable commit-msg hook
- -s[=<value>], --signoff[=<value>]
Add "Signed-off-by" message trailer.
The value is optional and defaults to the committer name and email. This option may be provided multiple times.
- --ack[=<value>]
Add "Acked-by" message trailer.
The value is optional and defaults to the committer’s name and email. This option may be provided multiple times.
- --review[=<value>]
Add "Reviewed-by" message trailer.
The value is optional and defaults to the committer’s name and email. This option may be provided multiple times.
- --author=<name-and-email>
Set the author "name <email>"
- --authname=<name>
Set the author name
- --authemail=<email>
Set the author email
- --authdate=<date>
Set the date the patch was authored.
Use "now" to use the current time and date.
- --committer-date-is-author-date
Instead of using the current time as the committer date, use the author date of the commit as the committer date.
- --save-template=<file>
Instead of running the command, just write the patch description to FILE, and exit. (If FILE is "-", write to stdout.)
When driving StGit from another program, it may be useful to first call a command with --save-template, then let the user edit the message, and then call the same command with --file.
Stgit
Part of the StGit suite - see stg(1)