STG-IMPORT(1)
β¨ STG-IMPORT π
okay so bestie, welcome to stg-import from the StGit Manual β this is the one that slides patches into your stack, and honestly? it's giving main character energy π
πΈ NAME πΈ
stg-import β import patches to stack π¦
β¨ SYNOPSIS β¨
like, here's all the ways you can run it, no cap:
stg import [OPTIONS] <diff-path>
stg import [OPTIONS] -m [<mail-path>|<Maildir-path>]
stg import [OPTIONS] -M [<mbox-path>]
stg import [OPTIONS] -S [<series-path>]
stg import [OPTIONS] -u <diff-url>
stg import [OPTIONS] -u -m <mail-url>
stg import [OPTIONS] -u -M <mbox-url>
stg import [OPTIONS] -u -S <series-url>
π DESCRIPTION π
So the whole vibe here is: import patches from various sources to the stack. literally that's the job. π
The simplest usage is to import a diff/patch file into the stack from a local file. By default, the file name is used as the patch name, but this can be overridden with --name. The patch can either be a normal file with the description at the top, or it can have standard mail format. The "Subject", "From", and "Date" headers will be used for the imported patch's author details. iykyk π
Patches may also be imported from a mail file (-m/--mail), an mbox (-M/--mbox), or a series (-S/--series). Furthermore, the -u/--url option allows the patches source to be fetched from a url instead of from a local file. obsessed with the flexibility tbh β¨
β οΈ okay listen: if a patch does not apply cleanly, import is aborted unless--rejectis specified, in which case it will apply to the work tree the parts of the patch that are applicable, leave the rejected hunks in corresponding*.rejfiles, and add an empty patch to the stack. so like, that's a whole situation π
The patch description must be separated from the diff with a "---" line. fr fr, don't forget this one π«Ά
π OPTIONS π
-m,--mailβ Import patch from an email file π-M,--mboxβ Import patch series from an mbox file π¬-S,--seriesβ Import patch series from a series file are tar archive. (yes bestie, that's what it says π)-u,--urlβ Retrieve source from a url instead of local file π-n <name>,--name=<name>β Use<name>as the patch name β¨-p <n>,--strip=<n>β Remove<n>leading components from diff paths (default1) βοΈ--directory=<root>β Prepend<root>to all filenames. If a"-p"argument is also passed, it is applied before prepending the new root. ποΈ-t,--stripnameβ Strip number and extension from patch name π-C <n>β Ensure<n>lines of matching context for each change π-3,--3wayβ Attempt 3-way merge if the patch records the identity of blobs it is supposed to apply to and those blobs are available locally. π§-i,--ignoreβ Ignore the applied patches in the series π--replaceβ Replace the unapplied patches in the series π-b <committish>,--base=<committish>β Use<committish>instead ofHEADfor file importing π±--rejectβ Leave rejected hunks in".rej"files π--keep-crβ Do not remove"\r"from email lines ending with"\r\n"π--message-idβ CreateMessage-IDtrailer in patch description based on theMessage-IDemail header. This option is applicable when importing with--mailor--mbox. This behavior may also be enabled via the"stgit.import.message-id"configuration option. π-e,--editβ Invoke editor for patch description π-d,--diffβ Show diff when editing patch description π--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. β°
π STGIT π
Part of the StGit suite β see stg(1) π
mwah π that's the whole page, bestie β brought to you by StGit 2.7.0, dated 10/17/2026. go forth and import, you absolute icon π¦πΈβ¨
π¦ where this page comes from
- opensuse-leap 16.0: stgit 2.7.0-bp160.1.1 Β· GPL-2.0-only
- opensuse-leap 16.0: stgit 2.7.0-bp160.1.1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms