table of contents
STG(1) | StGit Manual | STG(1) |
NAME¶
stg - Manage stacks of patches using the Git content tracker
SYNOPSIS¶
stg [--version | --help] stg [--help <command> | <command> --help] stg <command> [COMMAND OPTIONS] [ARGS]
DESCRIPTION¶
StGit (Stacked Git) is an application that provides a convenient way to maintain a patch stack on top of a Git branch:
Typical uses¶
Tracking branch
Commands of interest in this workflow are e.g. rebase and mail.
Development branch
Commands of interest in this workflow are e.g. uncommit, which can be used to move the patch stack base downwards — i.e., turn Git commits into StGit patches after the fact — and commit, its inverse.
For more information, see the tutorial[1].
Specifying patches¶
Many StGit commands take references to StGit patches as arguments. Patches in the stack are identified with short names, each of which must be unique in the stack.
Patches in the current branch are simply referred to by their name. Some commands allow you to specify a patch in another branch of the repository; this is done by prefixing the patch name with the branch name and a colon (e.g. otherbranch:thatpatch).
Specifying commits¶
Some StGit commands take Git commits as arguments. StGit accepts all commit expressions that Git does; and in addition, a patch name (optionally prefixed by a branch name and a colon) is allowed in this context. The usual Git modifiers ^ and ~ are also allowed; e.g., abranch:apatch~2 is the grandparent of the commit that is the patch apatch on branch abranch.
Instead of a patch name, you can say {base} to refer to the stack base (the commit just below the bottommost patch); so, abranch:{base} is the base of the stack in branch abranch.
If you need to pass a given StGit reference to a Git command, stg-id(1) will convert it to a Git commit id for you.
OPTIONS¶
The following generic option flags are available. Additional options are available for (and documented with) the different subcommands.
--version
--help
STGIT COMMANDS¶
We divide StGit commands in thematic groups, according to the primary type of object they create or change.
Here is a short description of each command. A more detailed description is available in individual command manpages. Those manpages are named stg-<command>(1).
Repository commands¶
Stack (branch) commands¶
Patch commands¶
Index/worktree commands¶
CONFIGURATION MECHANISM¶
StGit uses the same configuration mechanism as Git. See git(7) for more details.
TEMPLATES¶
A number of StGit commands make use of template files to provide useful default texts to be edited by the user. These <name>.tmpl template files are searched in the following directories:
NOTES¶
- 1.
- tutorial
03/27/2022 | StGit 1.5 |