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