@@ -56,18 +56,20 @@ OPTIONS[[OPTIONS]]
56
56
of a remote (see the section <<REMOTES,REMOTES>> below).
57
57
58
58
<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
+ +
71
73
If `git push [<repository>]` without any `<refspec>` argument is set to
72
74
update some ref at the destination with `<src>` with
73
75
`remote.<repository>.push` configuration variable, `:<dst>` part can
0 commit comments