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

Re: How do I track pu branch?

From
Junio C Hamano <junkio@cox.net>
Date
Aug 16, 2005, 02:55 UTC
Message-ID
<7vd5oepp3n.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7v4q9qr4gn.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
Show 5 quoted lines
> Martin Langhoff <martin.langhoff@gmail.com> writes:
>
>> Following an extenal repo, I am not getting all the heads. This is by
>> design, AFAIK, and the question is how do I find what heads the repo
>> offers and pull them in so I can call them by name?

Sorry, "git ls-remote" was the answer to only the first question. Regarding your second question.

Once you have found out about them, the way to use shorthand the current tool offers is:

	$ echo 'http://www.kernel.org/pub/scm/git/git.git/#pu' \
            >.git/branches/ko-pu
	$ git fetch ko-pu

Any "git fetch" creates .git/FETCH_HEAD file which holds the SHA1 object name of the fetched commit, but when shorthand recorded in .git/branches is involved, it additionally creates the file ".git/refs/heads/ko-pu". Then you could:

	$ git checkout -b for-junio ko-pu
        $ git apply --index <cvsimport-use-kk-flag.patch
        $ git commit -v -s
        $ git format-patch ko-pu..HEAD

Note. As I may have said elsewhere, "pu" branch in git.git repository is rebased almost daily, so please be prepared to throw away any branches you may fork off from it.

Note. The shorthand notation for the pull/fetch side is planned to be enhanced so that you can keep track of multiple remote heads. That has not happened yet.

Previous: Junio C HamanoNext: Martin Langhoff
Message 3 of 4 in “How do I track pu branch?”
  1. Martin LanghoffAug 16, 2005
  2. Junio C HamanoAug 16, 2005
  3. Junio C HamanoAug 16, 2005
  4. Martin LanghoffAug 16, 2005

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.