On Fri, Apr 13, 2007 at 12:10:17PM -0600, Brian Paul wrote: > Daniel Stone wrote: > > On Fri, Apr 13, 2007 at 06:18:12PM +0200, Michel Dänzer wrote: > >> It looks like you pushed your origin branch as well as your master > >> branch (for which there was another commit mail). This is usually due to > >> the git-push command line arguments or due to configuration > >> in .git/remotes/origin or .git/config . > >> > >> This should be less of a problem for people using GIT 1.5 or newer, but > >> somebody should still remove the origin branch in the shared repo. > > > > If someone makes sure that no origin commits will get lost, I'll > > cheerfully nuke the branch and make sure it can't ever be pushed again. > > I guess I'm confused about "origin" vs. "master". I've been using 'git > pull origin' and 'git push origin' all the time, per the wiki. Though > checking now, the wiki says "git pull" w/out origin. > > What are the ramifications of "nuking the (origin) branch"? Will 'git > push origin' change to something else?
Welcome to the ambiguity that 1.5 (mostly) resolves.
Right now, origin is overloaded in two senses:
* on your local checkout, 'origin' is shorthand for
ssh://git.fd.o/git/mesa/mesa. If you give no arguments,
master:master is implied[0]. So, git push origin expands to:
git push ssh://git.fd.o/git/mesa/mesa master:master
If you don't specify anything, origin is implied, so 'git push'
expands to the same thing. Ditto git pull.
* on your local checkout, 'origin' is whatever 'master' was on the
remote repository when you last pulled. So, it's a branch of its
own, essentially, but a virtual one: it just tracks the state of the
remote repository. You can configure .git/remotes/origin to have
this behaviour for other shared branches, so you have, e.g. 'git
pull origin && git rebase server-1.3-branch-origin' to rebase
yourself against server-1.3-branch on the origin.
When someone does 'git push --all', what happens is that every single
branch from your checkout gets pushed to the remote, _including virtual
branches such as origin_. A branch called 'origin' on the remote is
meaningless, because it's tracking the state of itself. Except that it
introduces ambiguity, because origin is now a local branch (the virtual
branch), an actual remote branch, and a remote repository.
So, you want to avoid someone pushing a branch called origin, because
it's basically meaningless, and the end result is just threads like
this, because 'origin' gets overloaded still further ...
Confused? :)
Cheers,
Daniel
[0]: This is actually subject to the contents of .git/remotes/origin.
signature.asc
Description: Digital signature
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Mesa3d-dev mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
