I use the following command to push to my remote branch:
git push origin sandbox
If I say
git push origin
(March 2012)
Beware: that default "matching
" policy might change soon
(sometimes after git1.7.10+):
See "Please discuss: what "git push" should do when you do not say what to push?"
In the current setting (i.e.
push.default=matching
),git push
without argument will push all branches that exist locally and remotely with the same name.
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.The proposal is to change the default to '
upstream
', i.e. push only the current branch, and push it to the branch git pull would pull from.
Another candidate is 'current
'; this pushes only the current branch to the remote branch of the same name.What has been discussed so far can be seen in this thread:
http://thread.gmane.org/gmane.comp.version-control.git/192547/focus=192694
Previous relevant discussions include:
To join the discussion, send your messages to: git@vger.kernel.org