1STG-PUBLISH(1) StGit Manual STG-PUBLISH(1)
2
3
4
6 stg-publish - Push the stack changes to a merge-friendly branch
7
9 stg publish [options] [--] [branch]
10
12 This command commits a set of changes on a separate (called public)
13 branch based on the modifications of the given or current stack. The
14 history of the public branch is not re-written, making it
15 merge-friendly and feasible for publishing. The heads of the stack and
16 public branch may be different but the corresponding tree objects are
17 always the same.
18
19 If the trees of the stack and public branch are different (otherwise
20 the command has no effect), StGit first checks for a rebase of the
21 stack since the last publishing. If a rebase is detected, StGit creates
22 a commit on the public branch corresponding to a merge between the new
23 stack base and the latest public head.
24
25 If no rebasing was detected, StGit checks for new patches that may have
26 been created on top of the stack since the last publishing. If new
27 patches are found and are not empty, they are checked into the public
28 branch keeping the same commit information (e.g. log message, author,
29 committer, date).
30
31 If the above tests fail (e.g. patches modified or removed), StGit
32 creates a new commit on the public branch having the same tree as the
33 stack but the public head as its parent. The editor will be invoked if
34 no "--message" option is given.
35
36 It is recommended that stack modifications falling in different
37 categories as described above are separated by a publish command in
38 order to keep the public branch history cleaner (otherwise StGit would
39 generate a big commit including several stack modifications).
40
41 The --unpublished option can be used to check if there are applied
42 patches that have not been published to the public branch. This is done
43 by trying to revert the patches in the public tree (similar to the push
44 --merged detection). The --last option tries to find the last published
45 patch by checking the SHA1 of the patch tree agains the public tree.
46 This may fail if the stack was rebased since the last publish command.
47
48 The public branch name can be set via the branch.<branch>.public
49 configuration variable (defaulting to "<branch>.public").
50
52 -b BRANCH, --branch BRANCH
53 Use BRANCH instead of the default branch.
54
55 -l, --last
56 Show the last published patch.
57
58 -u, --unpublished
59 Show applied patches that have not been published.
60
61 --author "NAME <EMAIL>"
62 Set the author details.
63
64 --authname NAME
65 Set the author name.
66
67 --authemail EMAIL
68 Set the author email.
69
70 --authdate DATE
71 Set the author date.
72
73 -m MESSAGE, --message MESSAGE
74 Use MESSAGE instead of invoking the editor.
75
76 -f FILE, --file FILE
77 Use the contents of FILE instead of invoking the editor. (If FILE
78 is "-", write to stdout.)
79
80 --sign
81 Add a "Signed-off-by:" to the end of the patch.
82
83 --ack
84 Add an "Acked-by:" line to the end of the patch.
85
86 --review
87 Add a "Reviewed-by:" line to the end of the patch.
88
90 Part of the StGit suite - see stg(1)
91
92
93
94
95StGit 07/17/2018 STG-PUBLISH(1)