git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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: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.

Previous: Greg KHNext: Junio C Hamano
Message 4 of 13 in “"git push" logic changed?”
  1. Greg KHJan 20, 2006
  2. Junio C HamanoJan 21, 2006
  3. Greg KHJan 21, 2006
  4. Junio C HamanoJan 21, 2006
  5. Junio C HamanoJan 21, 2006
  6. [RFC] Reverting "git push logic change"?Junio C Hamano, Jan 21, 2006
  7. Daniel BarkalowJan 22, 2006
  8. Junio C HamanoJan 22, 2006
  9. Junio C HamanoJan 22, 2006
  10. seanJan 22, 2006
  11. Junio C HamanoJan 22, 2006
  12. Junio C HamanoJan 23, 2006
  13. Greg KHJan 24, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.