Thread (1 message) 1 message, 1 author, 2016-06-15

Re: How do I track pu branch?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:04

Junio C Hamano [off-list ref] writes:
Martin Langhoff [off-list ref] writes:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help