Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Since <a href="http://www.kernel.org/pub/software/scm/git/docs/RelNotes-1.6.3.txt" rel="nofollow noreferrer">Git1.6.3</a>:</p> <blockquote> <p>When the user does not tell "<code>git push</code>" what to push, it has always pushed matching refs.<br> For some people it is unexpected, and a new configuration variable <code>push.default</code> has been introduced to allow changing a different default behavior.<br> To advertise the new feature, a big warning is issued if this is not configured and a git push without arguments is attempted.</p> </blockquote> <p>So the difference between current and tracking is that:</p> <ul> <li>current will assume a matching ref (a remote branch with the <em>same name</em>, which may not exist)</li> <li>tracking will based the remote ref to use on the tracking ref associated with that local branch. If it does not track anything, it won't push. But it can track a remote branch with a different name.a remo</li> </ul> <p>Note: <code>default nothing</code> would be useful for read-only repository, made only for content consultation, where no work is supposed to be done and published anywhere.</p> <p>See also the <a href="https://stackoverflow.com/questions/948354/git-push-current-branch">git push current branch</a> SO question.</p> <hr> <p>Update March 2012: <strong>Beware: that default "matching" policy might change soon</strong>:</p> <p>See "<a href="http://git-blame.blogspot.fr/2012/03/please-discuss-what-git-push-should-do.html" rel="nofollow noreferrer">Please discuss: what "git push" should do when you do not say what to push?</a>"</p> <blockquote> <p><strong>In the current setting</strong> (i.e. <strong><code>push.default=matching</code></strong>), <strong><code>git push</code> without argument will push all branches that exist locally and remotely with the same name</strong>.<br> This is usually appropriate when a developer pushes to his own public repository, but may be confusing if not dangerous when using a shared repository. </p> <p>The proposal is to <strong>change the default to '<code>upstream</code>'</strong>, i.e. push only the current branch, and push it to the branch git pull would pull from.<br> Another candidate is '<code>current</code>'; this pushes only the current branch to the remote branch of the same name.</p> <p>What has been discussed so far can be seen in this thread:</p> </blockquote> <p><a href="http://thread.gmane.org/gmane.comp.version-control.git/192547/focus=192694" rel="nofollow noreferrer">http://thread.gmane.org/gmane.comp.version-control.git/192547/focus=192694</a></p> <blockquote> <p>Previous relevant discussions include:</p> </blockquote> <ul> <li><a href="http://thread.gmane.org/gmane.comp.version-control.git/123350/focus=123541" rel="nofollow noreferrer">http://thread.gmane.org/gmane.comp.version-control.git/123350/focus=123541</a></li> <li><a href="http://thread.gmane.org/gmane.comp.version-control.git/166743" rel="nofollow noreferrer">http://thread.gmane.org/gmane.comp.version-control.git/166743</a></li> </ul> <blockquote> <p>To join the discussion, send your messages to: git@vger.kernel.org</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload