Re: "git push" logic changed?

From: Junio C Hamano <junkio@cox.net>
Date: 2006-01-21 11:54:28
Greg KH <greg@kroah.com> writes:

> Well what should I do then to push to "orgin"?
>...
> Yes, but "git push origin" used to push my local changes there, and
> that's all I really want.
>
> Someone off-list told me I could edit my .git/branches/parent file to
> fix this issue for that branch.  Since I hand-created that file in the
> first place, that's not a bit deal.  But I was relying on git to get the
> "origin" branch right, as I didn't edit it at all :)

If you cloned from "origin", then you would have gotton
something like:

	URL: that.machine:/this/directory.git
        Pull: master:origin

in your ".git/remotes/origin".  Since there are more downloaders
and individual developers than subsystem maintainers, this is a
good default for the former class of people.

You as the tree owner would then add "Push:" line(s) to push
back from your local repository.  For example:

	$ cat .git/remotes/origin	
	URL: that.machine:/this/directory.git
        Pull: master:origin
	Push: master:master

With this,

	$ git push origin

would push master branch to that.machine:/this/directory.git/
repository.  With --tags or --all:

	$ git push --tags origin
        $ git push --all origin

These "Push:" lines are for people who have write access to the
other side (which is a minority compared to downloaders), so git
does not create them by default when you clone the repository.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sat Jan 21 11:55:04 2006

This archive was generated by hypermail 2.1.8 : 2006-01-21 11:55:13 EST