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

Re: Problem with a push

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jun 12, 2007, 18:46 UTC
Message-ID
<alpine.LFD.0.98.0706121144050.14121@woody.linux-foundation.org>
In-Reply-To
<Pine.LNX.4.64.0706121309260.7703@www.mintpixels.com>
On Tue, 12 Jun 2007, Alex R.M. Turner wrote:
> 
> Based on what you've said, it seems like I should be initialising a blank 
> repo on machine A, then pushing from machine B to machine A, rather than 
> cloning on A from B.

That's generally what you'd do for a central repo, yes. But:

> At this point would it just be sensible to delete the remote branches on 
> machine A?

Yes, in the current environment, the easiest thing to do is to just remove those branches.

OR, alternatively, just keep them, but on machine B, make your .git/config file have something like

	[remote "origin"]
		url = ssh://aturner@svn.mintpixels.com/data/git/mls
		fetch = +refs/heads/*:refs/remotes/origin/*
		push = refs/heads/*:refs/heads/*

which should just make it clear to "git push" than when you push from B to "origin", you should push everything under "refs/heads" (assuming that's what you want, of course)-

		Linus
Previous: Alex R.M. TurnerNext: Jon Loeliger
Message 7 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.