Is there a way to get 'git fetch --no-tags' semantics with 'git clone'?
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Apr 14, 2017, 21:28 UTC
- Message-ID
- <CACBZZX584QwjphGfEgTn2V9P0yVkYSxfE1_Gp96bno8186SDyA@mail.gmail.com>
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-tagsIs 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?