Skip to content

Commit e5526ea

Browse files
committed
doc: convert git push to synopsis style
- Switch the synopsis to a synopsis block which will automatically format placeholders in italics and keywords in monospace - Use _<placeholder>_ instead of <placeholder> in the description - Use `backticks` for keywords and more complex option descriptions. The new rendering engine will apply synopsis rules to these spans. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
1 parent 5b1e64b commit e5526ea

File tree

2 files changed

+201
-179
lines changed

2 files changed

+201
-179
lines changed

Documentation/config/push.adoc

Lines changed: 59 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
push.autoSetupRemote::
2-
If set to "true" assume `--set-upstream` on default push when no
1+
`push.autoSetupRemote`::
2+
If set to `true` assume `--set-upstream` on default push when no
33
upstream tracking exists for the current branch; this option
4-
takes effect with push.default options 'simple', 'upstream',
5-
and 'current'. It is useful if by default you want new branches
4+
takes effect with `push.default` options `simple`, `upstream`,
5+
and `current`. It is useful if by default you want new branches
66
to be pushed to the default remote (like the behavior of
7-
'push.default=current') and you also want the upstream tracking
7+
`push.default=current`) and you also want the upstream tracking
88
to be set. Workflows most likely to benefit from this option are
9-
'simple' central workflows where all branches are expected to
9+
`simple` central workflows where all branches are expected to
1010
have the same name on the remote.
1111

12-
push.default::
12+
`push.default`::
1313
Defines the action `git push` should take if no refspec is
1414
given (whether from the command-line, config, or elsewhere).
1515
Different values are well-suited for
@@ -18,24 +18,28 @@ push.default::
1818
`upstream` is probably what you want. Possible values are:
1919
+
2020
--
21-
22-
* `nothing` - do not push anything (error out) unless a refspec is
23-
given. This is primarily meant for people who want to
24-
avoid mistakes by always being explicit.
25-
26-
* `current` - push the current branch to update a branch with the same
27-
name on the receiving end. Works in both central and non-central
28-
workflows.
29-
30-
* `upstream` - push the current branch back to the branch whose
31-
changes are usually integrated into the current branch (which is
32-
called `@{upstream}`). This mode only makes sense if you are
33-
pushing to the same repository you would normally pull from
34-
(i.e. central workflow).
35-
36-
* `tracking` - This is a deprecated synonym for `upstream`.
37-
38-
* `simple` - push the current branch with the same name on the remote.
21+
`nothing`;;
22+
do not push anything (error out) unless a refspec is
23+
given. This is primarily meant for people who want to
24+
avoid mistakes by always being explicit.
25+
26+
`current`;;
27+
push the current branch to update a branch with the same
28+
name on the receiving end. Works in both central and non-central
29+
workflows.
30+
31+
`upstream`;;
32+
push the current branch back to the branch whose
33+
changes are usually integrated into the current branch (which is
34+
called `@{upstream}`). This mode only makes sense if you are
35+
pushing to the same repository you would normally pull from
36+
(i.e. central workflow).
37+
38+
`tracking`;;
39+
this is a deprecated synonym for `upstream`.
40+
41+
`simple`;;
42+
push the current branch with the same name on the remote.
3943
+
4044
If you are working on a centralized workflow (pushing to the same repository you
4145
pull from, which is typically `origin`), then you need to configure an upstream
@@ -44,16 +48,17 @@ branch with the same name.
4448
This mode is the default since Git 2.0, and is the safest option suited for
4549
beginners.
4650

47-
* `matching` - push all branches having the same name on both ends.
48-
This makes the repository you are pushing to remember the set of
49-
branches that will be pushed out (e.g. if you always push 'maint'
50-
and 'master' there and no other branches, the repository you push
51-
to will have these two branches, and your local 'maint' and
52-
'master' will be pushed there).
51+
`matching`;;
52+
push all branches having the same name on both ends.
53+
This makes the repository you are pushing to remember the set of
54+
branches that will be pushed out (e.g. if you always push `maint`
55+
and `master` there and no other branches, the repository you push
56+
to will have these two branches, and your local `maint` and
57+
`master` will be pushed there).
5358
+
5459
To use this mode effectively, you have to make sure _all_ the
5560
branches you would push out are ready to be pushed out before
56-
running 'git push', as the whole point of this mode is to allow you
61+
running `git push`, as the whole point of this mode is to allow you
5762
to push all of the branches in one go. If you usually finish work
5863
on only one branch and push out the result, while other branches are
5964
unfinished, this mode is not for you. Also this mode is not
@@ -66,24 +71,24 @@ new default).
6671

6772
--
6873

69-
push.followTags::
74+
`push.followTags`::
7075
If set to true, enable `--follow-tags` option by default. You
7176
may override this configuration at time of push by specifying
7277
`--no-follow-tags`.
7378

74-
push.gpgSign::
75-
May be set to a boolean value, or the string 'if-asked'. A true
79+
`push.gpgSign`::
80+
May be set to a boolean value, or the string `if-asked`. A true
7681
value causes all pushes to be GPG signed, as if `--signed` is
77-
passed to linkgit:git-push[1]. The string 'if-asked' causes
82+
passed to linkgit:git-push[1]. The string `if-asked` causes
7883
pushes to be signed if the server supports it, as if
79-
`--signed=if-asked` is passed to 'git push'. A false value may
84+
`--signed=if-asked` is passed to `git push`. A false value may
8085
override a value from a lower-priority config file. An explicit
8186
command-line flag always overrides this config option.
8287

83-
push.pushOption::
88+
`push.pushOption`::
8489
When no `--push-option=<option>` argument is given from the
85-
command line, `git push` behaves as if each <value> of
86-
this variable is given as `--push-option=<value>`.
90+
command line, `git push` behaves as if each _<option>_ of
91+
this variable is given as `--push-option=<option>`.
8792
+
8893
This is a multi-valued variable, and an empty value can be used in a
8994
higher priority configuration file (e.g. `.git/config` in a
@@ -109,26 +114,26 @@ This will result in only b (a and c are cleared).
109114

110115
----
111116
112-
push.recurseSubmodules::
113-
May be "check", "on-demand", "only", or "no", with the same behavior
114-
as that of "push --recurse-submodules".
115-
If not set, 'no' is used by default, unless 'submodule.recurse' is
116-
set (in which case a 'true' value means 'on-demand').
117+
`push.recurseSubmodules`::
118+
May be `check`, `on-demand`, `only`, or `no`, with the same behavior
119+
as that of `push --recurse-submodules`.
120+
If not set, `no` is used by default, unless `submodule.recurse` is
121+
set (in which case a `true` value means `on-demand`).
117122
118-
push.useForceIfIncludes::
119-
If set to "true", it is equivalent to specifying
123+
`push.useForceIfIncludes`::
124+
If set to `true`, it is equivalent to specifying
120125
`--force-if-includes` as an option to linkgit:git-push[1]
121126
in the command line. Adding `--no-force-if-includes` at the
122127
time of push overrides this configuration setting.
123128
124-
push.negotiate::
125-
If set to "true", attempt to reduce the size of the packfile
129+
`push.negotiate`::
130+
If set to `true`, attempt to reduce the size of the packfile
126131
sent by rounds of negotiation in which the client and the
127-
server attempt to find commits in common. If "false", Git will
132+
server attempt to find commits in common. If `false`, Git will
128133
rely solely on the server's ref advertisement to find commits
129134
in common.
130135
131-
push.useBitmaps::
132-
If set to "false", disable use of bitmaps for "git push" even if
133-
`pack.useBitmaps` is "true", without preventing other git operations
134-
from using bitmaps. Default is true.
136+
`push.useBitmaps`::
137+
If set to `false`, disable use of bitmaps for `git push` even if
138+
`pack.useBitmaps` is `true`, without preventing other git operations
139+
from using bitmaps. Default is `true`.

0 commit comments

Comments
 (0)