chiark / gitweb /
Rename "stg assimilate" to "stg repair"
[stgit] / Documentation / stg.txt
CommitLineData
36043cd6 1stg(1)
4ec67741
YD
2======
3Yann Dirson <ydirson@altern.org>
4v0.12.1, February 2007
5
6NAME
7----
8stg - manage stacks of patches using the GIT content tracker
9
10SYNOPSIS
11--------
12[verse]
d1d7d28d
YD
13'stg' [--version | --help]
14'stg' [--help <command> | <command> --help]
15'stg' <command> [COMMAND OPTIONS] [ARGS]
4ec67741
YD
16
17DESCRIPTION
18-----------
19
20StGIT (Stacked GIT) is an application providing similar functionality
21to Quilt (i.e. pushing/popping patches to/from a stack), on top of
22GIT. These operations are performed using GIT commands and the patches
23are stored as GIT commit objects, allowing easy merging of the StGIT
24patches into other repositories using standard GIT functionality.
25
bfbfd4e5
YD
26An StGIT stack is a GIT branch with additional information to help
27making changes to individual patches you already committed, rather
28than making changes by adding new commits. It is thus a
29non-forwarding, or rewinding branch: the old head of the branch is
30often not reachable as one of the new head's ancestors.
31
4ec67741
YD
32Typical uses of StGIT include:
33
34Tracking branch::
bfbfd4e5
YD
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
40 upstream.
41+
42In such a setup, typically all commits on your branch are StGIT
43patches; the stack base is the branch point where your changes "fork"
44off their parent branch.
4ec67741
YD
45
46Development branch::
47 Preparing and testing your commits before publishing them,
48 separating your features from unrelated bugfixes collected
49 while developping.
bfbfd4e5
YD
50+
51In such a setup, not all commits on your branch need to be StGIT
52patches; there may be regular GIT commits below your stack base.
4ec67741 53
7cc23744
YD
54Patches
55~~~~~~~
56
57Many StGIT commands take references to StGIT patches as arguments.
58Patches in the stack are identified with short names, each of which
59must be unique in the stack.
60
61Patches in the current stack are just referred to by their name. Some
62commands allow you to specify a patch in another stack of the repository;
63this is done by suffixing the patch name with an '@' sign followed by the
64branch name (eg. 'thispatch@otherbranch').
65
66A number of positions in the stack related to the patch are also
67accessible through '//' suffixes. For example, 'patch//top' is
68equivalent 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
70bottom-most patch). Similarly '//top.old' and '//bottom.old'
71refer to the previous version of the patch (before the last
72stglink:push[] or stglink:refresh[] operation). When referring to the
73current patch, its name can be omitted (eg. 'currentpatch//bottom.old'
74can be abbreviated as 'bottom.old').
75
76If you need to pass a given StGIT reference to a git command,
77stglink:id[] will convert it to a git commit id.
78
4ec67741
YD
79OPTIONS
80-------
81
d1d7d28d
YD
82The following generic option flags are available. Additional options
83are available per-command, and documented in the command-specific
84documentation.
85
4ec67741
YD
86--version::
87 Prints the StGIT suite version that the 'stg' program came
88 from, as well as version of other components used, such as GIT
89 and Python.
90
91--help::
92 Prints the synopsis and a list of all commands. If a git
93 command is given this option will display the specific help
94 for that command.
95
96STGIT COMMANDS
97--------------
98
99We divide StGIT commands in thematic groups, according to the primary
100type of object they create or change.
101
102ifdef::backend-docbook[]
103Here is a short description of each command. A more detailed
104description is available in individual command manpages. Those
105manpages are named 'stg-<command>(1)'.
106endif::backend-docbook[]
107
108Generic commands
109~~~~~~~~~~~~~~~~
110
111User-support commands not touching the repository.
112
c2b87fa2 113stg help::
4ec67741 114 stgdesc:help[]
c2b87fa2 115stg version::
4ec67741 116 stgdesc:version[]
c2b87fa2 117stg copyright::
4ec67741
YD
118 stgdesc:copyright[]
119
120Repository commands
121~~~~~~~~~~~~~~~~~~~
122
123stglink:clone[]::
124 stgdesc:clone[]
125stglink:id[]::
126 stgdesc:id[]
127
128Stack commands
129~~~~~~~~~~~~~~
130
131Stack management
132^^^^^^^^^^^^^^^^
133
134stglink:branch[]::
135 stgdesc:branch[]
136stglink:init[]::
137 stgdesc:init[]
138stglink:clean[]::
139 stgdesc:clean[]
140stglink:pull[]::
141 stgdesc:pull[]
142stglink:rebase[]::
143 stgdesc:rebase[]
144
145stglink:commit[]::
146 stgdesc:commit[]
147stglink:uncommit[]::
148 stgdesc:uncommit[]
051090dd
KH
149stglink:repair[]::
150 stgdesc:repair[]
4ec67741
YD
151
152Controlling what patches are applied
153^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
154
155stglink:series[]::
156 stgdesc:series[]
157stglink:push[]::
158 stgdesc:push[]
159stglink:pop[]::
160 stgdesc:pop[]
161stglink:goto[]::
162 stgdesc:goto[]
163stglink:float[]::
164 stgdesc:float[]
6f1c5e3c
YD
165stglink:sink[]::
166 stgdesc:sink[]
4ec67741
YD
167stglink:applied[]::
168 stgdesc:applied[]
169stglink:unapplied[]::
170 stgdesc:unapplied[]
171stglink:top[]::
172 stgdesc:top[]
173
174stglink:hide[]::
175 stgdesc:hide[]
176stglink:unhide[]::
177 stgdesc:unhide[]
178
179Miscellaneous stack commands
180^^^^^^^^^^^^^^^^^^^^^^^^^^^^
181
182stglink:patches[]::
183 stgdesc:patches[]
184
185
186Patch commands
187~~~~~~~~~~~~~~
188
189Patch management
190^^^^^^^^^^^^^^^^
191
192stglink:new[]::
193 stgdesc:new[]
194stglink:delete[]::
195 stgdesc:delete[]
196stglink:rename[]::
197 stgdesc:rename[]
198stglink:log[]::
199 stgdesc:log[]
200
201Controlling patch contents
202^^^^^^^^^^^^^^^^^^^^^^^^^^
203
204stglink:files[]::
205 stgdesc:files[]
206stglink:show[]::
207 stgdesc:show[]
208stglink:refresh[]::
209 stgdesc:refresh[]
210stglink:fold[]::
211 stgdesc:fold[]
212stglink:pick[]::
213 stgdesc:pick[]
214stglink:sync[]::
215 stgdesc:sync[]
216
217Interaction with the rest of the world
218^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
219
220stglink:export[]::
221 stgdesc:export[]
222stglink:import[]::
223 stgdesc:import[]
224stglink:mail[]::
225 stgdesc:mail[]
226
227
228Working-copy commands
229~~~~~~~~~~~~~~~~~~~~~
230
231stglink:add[]::
232 stgdesc:add[]
233stglink:rm[]::
234 stgdesc:rm[]
d5ae2173
YD
235stglink:cp[]::
236 stgdesc:cp[]
4ec67741
YD
237stglink:status[]::
238 stgdesc:status[]
239stglink:diff[]::
240 stgdesc:diff[]
241stglink:resolved[]::
242 stgdesc:resolved[]
243
244CONFIGURATION MECHANISM
245-----------------------
246
247Starting with 0.12, StGIT uses the same configuration mechanism as
248GIT. See gitlink:git[7] for more details.
249
250TEMPLATES
251---------
252
253A number of StGIT commands make use of template files to provide
254useful default texts to be edited by the user. These '<name>.tmpl'
255template files are searched in the following directories:
256
257 $GITDIR/
258 $HOME/.stgit/templates/
259 /usr/share/stgit/templates/