Re: "git push" logic changed?
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jan 21, 2006, 00:54 UTC
- Message-ID
- <7vacdq2yez.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20060121001547.GA30712@kroah.com>
Greg KH <greg@kroah.com> writes:
Show 9 quoted lines
> 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:originin 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:masterWith 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 originThese "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.