Re: [RFC PATCH] Allow cloning branches selectively
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Dec 25, 2011, 16:28 UTC
- Message-ID
- <m3hb0ofwem.fsf@localhost.localdomain>
- In-Reply-To
- <1324671199-7074-1-git-send-email-cmn@elego.de>
Carlos Martín Nieto <cmn@elego.de> writes:
Show 7 quoted lines
> Sometimes it's useful to clone only a subset of branches from a remote > we're cloning. Teach clone the --fetch option to select which branches > should get fetched. > > Each --fetch sets up a fetch refspec for that branch. Previously this > was only possible by initializing a repo and manually setting up the > config.
I haven't read the code, but I guess it should be possible to share code with "git remote add", which allows to select which branches to track, and which branch is to be 'main' on remote.
git remote add [-t <branch>] [-m <master>] [-f] ...
-- Jakub Narebski