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

Re: Problem with a push

From
APAndy Parkins <andyparkins@gmail.com>
Date
Jun 12, 2007, 09:07 UTC
Message-ID
<200706121007.17044.andyparkins@gmail.com>
In-Reply-To
<alpine.LFD.0.98.0706111556160.14121@woody.linux-foundation.org>
On Tuesday 2007 June 12, Linus Torvalds wrote:
> Ok, pushing out remote branches is a bit odd in the first place. As in
> "you probably shouldn't do that". The "remote" branches are really local
> to each repo, and updating them by pushing is really quite suspect.
I agree its odd, but is it really true that one (I) shouldn't be doing it?
Can I tell you what I'm doing, and check that it's not crazy...

I have my laptop and my desktop computer; I use both for development. I've set them so that they are symmetric...

laptop:.git/config
 [remote "desktop"]
   url = ssh://blah blah blah
   fetch = refs/heads/*:refs/remotes/desktop/*
   push = refs/heads/*:refs/remotes/laptop/*
desktop:.git/config
 [remote "laptop"]
   url = ssh://blah blah blah
   fetch = refs/heads/*:refs/remotes/laptop/*
   push = refs/heads/*:refs/remotes/desktop/*

This is very handy, as git-push on one does the same as git-fetch on the other. Have I made a glaring mistake by pushing to a remote ref?

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
Previous: Junio C HamanoNext: Linus Torvalds
Message 10 of 15 in “Problem with a push”
  1. Alex R.M. TurnerJun 11, 2007
  2. Linus TorvaldsJun 11, 2007
  3. Alex R.M. TurnerJun 11, 2007
  4. Linus TorvaldsJun 12, 2007
  5. Junio C HamanoJun 12, 2007
  6. Alex R.M. TurnerJun 12, 2007
  7. Linus TorvaldsJun 12, 2007
  8. Jon LoeligerJun 12, 2007
  9. Junio C HamanoJun 11, 2007
  10. Andy ParkinsJun 12, 2007
  11. Linus TorvaldsJun 12, 2007
  12. Junio C HamanoJun 12, 2007
  13. Linus TorvaldsJun 12, 2007
  14. Martin LanghoffJun 12, 2007
  15. "git-push $URL" without refspecs pushes only matching branchesJunio C Hamano, Jul 2, 2007

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.