Re: [PATCHv4] clone --single: limit the fetch refspec to fetched branch
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Sep 17, 2012, 12:11 UTC
- Message-ID
- <CACsJy8BGBwNp-oDsnB1QObrVLU54rtDmGGBF=Muww8ZJjfZScA@mail.gmail.com>
- In-Reply-To
- <CACsJy8Bsps_-RaXdBd9ipWPvJukjK7mRN_wG2ezEL5d4JLyx+g@mail.gmail.com>
On Mon, Sep 17, 2012 at 7:06 PM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
> --mirror --single-branch combination does not look right. The "heads/" > part is missing..
It also does not look right for cloning a tag:
$ LANG=C ./git clone --single-branch --branch=v1.7.0 .git abc Cloning into 'abc'... done. Note: checking out 'e923eaeb901ff056421b9007adcbbce271caa7b6'.
You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
$ grep fetch abc/.git/config
fetch = +refs/heads/v1.7.0:refs/remotes/origin/v1.7.0-- Duy