@matheusbsbs / matheus-bagliano / commits / d6aba61f88
Fork 0

git-push.txt: describe how to default to pushing only current branch

Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Chris Johnsen committed Mar 14, 2009 at 21:32 UTC d6aba61f88dafc10cfb874b91e7864419fa81fd7
1 file changed +24 -2
Documentation/git-push.txt
+24 -2
@@ -24,8 +24,8 @@ every time you push into it, by setting up 'hooks' there. See
24 documentation for linkgit:git-receive-pack[1].
25
26
27 -OPTIONS
28 --------
27 +OPTIONS[[OPTIONS]]
28 +------------------
29 <repository>::
30 The "remote" repository that is destination of a push
31 operation. This parameter can be either a URL
@@ -187,6 +187,28 @@ reason::
187 Examples
188 --------
189
190 +git push::
191 + Works like `git push <remote>`, where <remote> is the
192 + current branch's remote (or `origin`, if no remote is
193 + configured for the current branch).
194 +
195 +git push origin::
196 + Without additional configuration, works like
197 + `git push origin :`.
198 ++
199 +The default behavior of this command when no <refspec> is given can be
200 +configured by setting the `push` option of the remote.
201 ++
202 +For example, to default to pushing only the current branch to `origin`
203 +use `git config remote.origin.push HEAD`. Any valid <refspec> (like
204 +the ones in the examples below) can be configured as the default for
205 +`git push origin`.
206 +
207 +git push origin :::
208 + Push "matching" branches to `origin`. See
209 + <refspec> in the <<OPTIONS,OPTIONS>> section above for a
210 + description of "matching" branches.
211 +
212 git push origin master::
213 Find a ref that matches `master` in the source repository
214 (most likely, it would find `refs/heads/master`), and update