3 Yann Dirson <ydirson@altern.org>
8 stg - manage stacks of patches using the GIT content tracker
13 'stg' [--version | --help]
14 'stg' [--help <command> | <command> --help]
15 'stg' <command> [COMMAND OPTIONS] [ARGS]
20 StGIT (Stacked GIT) is an application providing similar functionality
21 to Quilt (i.e. pushing/popping patches to/from a stack), on top of
22 GIT. These operations are performed using GIT commands and the patches
23 are stored as GIT commit objects, allowing easy merging of the StGIT
24 patches into other repositories using standard GIT functionality.
26 An StGIT stack is a GIT branch with additional information to help
27 making changes to individual patches you already committed, rather
28 than making changes by adding new commits. It is thus a
29 non-forwarding, or rewinding branch: the old head of the branch is
30 often not reachable as one of the new head's ancestors.
32 Typical uses of StGIT include:
35 Tracking changes from a remote branch, while maintaining local
36 modifications against that branch, possibly with the intent of
37 sending some patches upstream. StGIT assists in preparing and
38 cleaning up patches until they are acceptable upstream, as
39 well as maintaining local patches not meant to be sent
42 In such a setup, typically all commits on your branch are StGIT
43 patches; the stack base is the branch point where your changes "fork"
44 off their parent branch.
47 Preparing and testing your commits before publishing them,
48 separating your features from unrelated bugfixes collected
51 In such a setup, not all commits on your branch need to be StGIT
52 patches; there may be regular GIT commits below your stack base.
57 Many StGIT commands take references to StGIT patches as arguments.
58 Patches in the stack are identified with short names, each of which
59 must be unique in the stack.
61 Patches in the current stack are just referred to by their name. Some
62 commands allow you to specify a patch in another stack of the repository;
63 this is done by suffixing the patch name with an '@' sign followed by the
64 branch name (eg. 'thispatch@otherbranch').
66 A number of positions in the stack related to the patch are also
67 accessible through '//' suffixes. For example, 'patch//top' is
68 equivalent to 'patch', and 'patch//bottom' refers to the commit below
69 'patch' (i.e. the patch below, or the stack base if this is the
70 bottom-most patch). Similarly '//top.old' and '//bottom.old'
71 refer to the previous version of the patch (before the last
72 stglink:push[] or stglink:refresh[] operation). When referring to the
73 current patch, its name can be omitted (eg. 'currentpatch//bottom.old'
74 can be abbreviated as 'bottom.old').
76 If you need to pass a given StGIT reference to a git command,
77 stglink:id[] will convert it to a git commit id.
82 The successive versions of each patch are stored in a "patch log".
84 TODO: document patchlog, explain empty refreshs, non-empty pushs,
85 conflicts, partial pushs, ...
91 The following generic option flags are available. Additional options
92 are available per-command, and documented in the command-specific
96 Prints the StGIT suite version that the 'stg' program came
97 from, as well as version of other components used, such as GIT
101 Prints the synopsis and a list of all commands. If a git
102 command is given this option will display the specific help
108 We divide StGIT commands in thematic groups, according to the primary
109 type of object they create or change.
111 ifdef::backend-docbook[]
112 Here is a short description of each command. A more detailed
113 description is available in individual command manpages. Those
114 manpages are named 'stg-<command>(1)'.
115 endif::backend-docbook[]
120 User-support commands not touching the repository.
158 stglink:assimilate[]::
161 Controlling what patches are applied
162 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
178 stglink:unapplied[]::
188 Miscellaneous stack commands
189 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
210 Controlling patch contents
211 ^^^^^^^^^^^^^^^^^^^^^^^^^^
226 Interaction with the rest of the world
227 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
237 Working-copy commands
238 ~~~~~~~~~~~~~~~~~~~~~
253 CONFIGURATION MECHANISM
254 -----------------------
256 Starting with 0.12, StGIT uses the same configuration mechanism as
257 GIT. See gitlink:git[7] for more details.
262 A number of StGIT commands make use of template files to provide
263 useful default texts to be edited by the user. These '<name>.tmpl'
264 template files are searched in the following directories:
267 $HOME/.stgit/templates/
268 /usr/share/stgit/templates/