chiark / gitweb /
Add a Documentation directory inspired by the git one.
[stgit] / Documentation / stg-new.txt
CommitLineData
4ec67741
YD
1stg-new(1)
2==========
3Yann Dirson <ydirson@altern.org>
4v0.12.1, February 2007
5
6NAME
7----
8stg-new - stgdesc:new[]
9
10SYNOPSIS
11--------
12stg new [OPTIONS] <name>
13
14DESCRIPTION
15-----------
16
17Create a new, empty patch with the given <name> on the current stack.
18The new patch is created on top of the currently applied patches, and
19is made the new top of the stack. The local changes in the working
20tree are not included in the patch. A stglink:refresh[] command is
21needed for this.
22
23An editor will be launched to edit the commit message to be used for
24the patch, unless the '--message' flag already specified one. The
25'patchdescr.tmpl' template file is used if available to pre-fill the
26editor. The editor to use is taken from the first of the following
27sources of information, and defaults to 'vi':
28
29. the 'stgit.editor' GIT configuration variable
30. the 'EDITOR' environment variable
31
32The message and other GIT commit attributes can be modified later
33using stglink:refresh[].
34
35AUTHOR AND COMMITTER INFORMATION
36--------------------------------
37
38The author name (resp. email) to record in the StGIT patch is taken
39from the first of the following sources for the information:
40
41. the '--authname' (resp. '--authemail') or '--author' flag on command-line
42. the 'GIT_AUTHOR_NAME' (resp. 'GIT_AUTHOR_EMAIL') environment variable
43. the 'user.name' (resp. 'user.email') GIT configuration variable
44
45Similarly, the committer name (resp. email) is taken from the first of
46the following sources:
47
48. the '--commname' (resp. '--commemail') flag on command-line
49. the 'GIT_COMMITTER_NAME' (resp. 'GIT_COMMITTER_EMAIL') environment variable
50. the 'user.name' (resp. 'user.email') GIT configuration variable
51
52The GIT commit generated by stglink:refresh[] will use these
53informations when available. If one of them is not available, GIT
54will pick the value from your machine's configuration at that time, as
55described in gitlink:git-commit-tree[1].
56
57OPTIONS
58-------
59
60<name>::
61 The short name that will be used as to identify the patch in
62 other StGIT commands. Must be unique in the stack. May only
63 contain alphanumeric characters, dashes and underscores.
64
65--message=<message>::
66-m <message>::
67 Use <message> as the patch description.
68
69--showpatch::
70-s::
71 Show the patch content in the editor buffer. This flag does
72 nothing if '-m' is also specified.
73
74--author="Name <email@company>"::
75-a "Name <email@company>"::
76 Use "Name <email@company>" as the author details. This form
77 sets both 'authname' and 'authemail'.
78
79--authname=<name>::
80 Use <name> as the author name
81--authemail=<email>::
82 Use <email> as the author e-mail
83--authdate=<date>::
84 Use <date> as the author date
85
86--commname=<name>::
87 Use <name> as the committer name
88--commemail=<email>::
89 Use <email> as the committer e-mail
90
91FILES
92-----
93
94 <templates>/patchdescr.tmpl
95
96ENVIRONMENT VARIABLES
97---------------------
98
99 GIT_AUTHOR_NAME
100 GIT_AUTHOR_EMAIL
101 GIT_AUTHOR_DATE
102 GIT_COMMITTER_NAME
103 GIT_COMMITTER_EMAIL
104 EDITOR
105
106GIT CONFIGURATION VARIABLES
107---------------------------
108
109 user.name
110 user.email
111 stgit.editor
112
113StGIT
114-----
115Part of the StGIT suite - see gitlink:stg[7].