Thread (5 messages) 5 messages, 3 authors, 2017-04-25

Is there a way to get 'git fetch --no-tags' semantics with 'git clone'?

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2017-04-14 21:29:21

As far as I can tell the only way to clone a given upstream repo,
which has an unknown main branch name without any tags is:

    git clone --single-branch <url> <repo> &&
    cd <repo> &&
    git tag -d $(git tag -l) &&
    git config remote.origin.tagOpt --no-tags

Is there really nothing like:

    git clone --single-branch --no-tags <url> <repo>

?

I suppose this can be done with the usual 'git init`, set the config &
then fetch dance, but in that case what part of 'git remote' or
friends exposes finding the remote "main" ref as --single-branch does?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help