Skip to content

Commit af6ee52

Browse files
committed
update intro
1 parent 433fef1 commit af6ee52

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

Documentation/git-push.adoc

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,20 @@ OPTIONS[[OPTIONS]]
5656
of a remote (see the section <<REMOTES,REMOTES>> below).
5757

5858
<refspec>...::
59-
Specify what destination ref to update with what source object.
60-
The format of a <refspec> parameter is an optional plus
61-
`+`, followed by the source object <src>, followed
62-
by a colon `:`, followed by the destination ref <dst>.
63-
+
64-
The <src> is often the name of the branch you would want to push, but
65-
it can be any arbitrary "SHA-1 expression", such as `master~4` or
66-
`HEAD` (see linkgit:gitrevisions[7]).
67-
+
68-
The <dst> tells which ref on the remote side is updated with this
69-
push. Arbitrary expressions cannot be used here, an actual ref must
70-
be named.
59+
Specify what destination branch or tag (or other reference) to update
60+
with what source commit (or other object).
61+
+
62+
The format for a refspec is [+]<src>[:<dst>], for example `main`,
63+
`main:other`, or `HEAD^:refs/heads/main`.
64+
+
65+
The `<src>` is often the name of the local branch to push, but it can be
66+
any arbitrary "SHA-1 expression" (see linkgit:gitrevisions[7]).
67+
+
68+
The `<dst>` determines what to update on the remote side. It must be the
69+
name of a branch, tag, or other ref, not an arbitrary expression.
70+
+
71+
The `+` is optional and does the same thing as `--force`.
72+
+
7173
If `git push [<repository>]` without any `<refspec>` argument is set to
7274
update some ref at the destination with `<src>` with
7375
`remote.<repository>.push` configuration variable, `:<dst>` part can

0 commit comments

Comments
 (0)