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

Re: Pulling peer's branch and getting tracking branch created

From
Junio C Hamano <junkio@cox.net>
Date
Feb 27, 2007, 00:59 UTC
Message-ID
<7v7iu4l8k0.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<17891.32095.655545.637691@lisa.zopyra.com>
Bill Lear <rael@zopyra.com> writes:
> I can't seem to figure out the correct magic to get my buddy's branch,
> and create the appropriate tracking branch at the same time without
> doing a clone.
I'll cheat and ask "git show b6f5da1e" ;-).
	$ git remote add -f -m master bob ../bob.git/
which should add:
	[remote "bob"]
        	url = ../bob.git/
		fetch = +refs/heads/*:refs/remotes/bob/*

to .git/config, and perform the initial "git fetch bob" so that bob's heads appear under your .git/refs/remotes/bob/*, iow, after this, you can ask:

	$ git branch -r
	  bob/HEAD
          bob/master
          bob/topic-1
          bob/topic-2
          ...
Previous: Bill LearNext: Bill Lear
Message 2 of 7 in “Pulling peer's branch and getting tracking branch created”
  1. Bill LearFeb 27, 2007
  2. Junio C HamanoFeb 27, 2007
  3. Bill LearFeb 27, 2007
  4. Junio C HamanoFeb 27, 2007
  5. Bill LearFeb 27, 2007
  6. Junio C HamanoFeb 27, 2007
  7. Bill LearFeb 27, 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.