Stacked Git logo

Stacked Git

stg-export(1)

NAME

stg-export - Export patches to a directory

SYNOPSIS

stg export [OPTIONS] [patch]…​

DESCRIPTION

Export a range of patches to a given directory in unified diff format. All applied patches are exported by default.

Patches are exported to patches-<branch> by default. The --dir option may be used to specify a different output directory.

The patch file output may be customized via a template file found at "$GIT_DIR/patchexport.tmpl", "~/.stgit/templates/patchexport.tmpl", or "$(prefix)/share/stgit/templates". The following variables are supported in the template file:

%(description)s - patch description
%(shortdescr)s  - the first line of the patch description
%(longdescr)s   - the rest of the patch description, after the first line
%(diffstat)s    - the diff statistics
%(authname)s    - author name
%(authemail)s   - author email
%(authdate)s    - patch creation date (ISO-8601 format)
%(commname)s    - committer name
%(commemail)s   - committer email

OPTIONS

-b <branch>
--branch=<branch>

Use <branch> instead of current branch

-d <dir>
--dir=<dir>

Export patches to <dir> instead of the default

-p
--patch

Suffix patch file names with ".patch"

-e <ext>
--extension=<ext>

Suffix patch file names with ".<ext>"

-n
--numbered

Prefix patch file names with order numbers.

-t <file>
--template=<file>

Use <file> as template

-s
--stdout

Export to stdout instead of directory

-O <option>
--diff-opt=<option>

Pass additional <option> to git diff.

See the git-diff(1) man page. This option may be specified multiple times.

StGit

Part of the StGit suite - see stg(1)