Thread (9 messages) 9 messages, 5 authors, 2016-06-15

Re: Find main branch

flat view

From: Stefan Beller <hidden>
Date: 2016-06-15 23:07:45

Looking at the capabilities the server sends you.
(I forgot if there is a git command for it, but:)

# check for http://github.com/gitster/git
ssh git@github.com git-upload-pack gitster/git
0104fc10eb5b87a75af2cb93a3932897572f2c544915 HEADmulti_ack thin-pack
side-band side-band-64k ofs-delta shallow no-progress include-tag
multi_ack_detailed symref=HEAD:refs/heads/master
agent=git/2:2.4.8~peff-symbolic-refs-iii-revenge-of-the-sith-1258-gc4b0e8b

Notice the "symref=HEAD:refs/heads/master", which is what you want.

On Thu, Jan 14, 2016 at 10:17 AM, pedro rijo [off-list ref] wrote:
Hey,

If I clone a repo, the repo will be on a specific branch, the 'main'
(typically 'master') branch.

Is there any direct command to find that main branch, since that
information is present?

If so, is there any way to find it without actually cloning the repo
(similar to git ls-remote)?

--
Thanks,

Pedro Rijo
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help