Re: [RFC PATCH] Allow cloning branches selectively
- From
Carlos Martín Nieto <cmn@elego.de>
- Date
- Dec 25, 2011, 17:43 UTC
- Message-ID
- <20111225174322.GB6361@beez.lab.cmartin.tk>
- In-Reply-To
- <m3hb0ofwem.fsf@localhost.localdomain>
On Sun, Dec 25, 2011 at 08:28:39AM -0800, Jakub Narebski wrote:
Show 15 quoted lines
> Carlos Martín Nieto <cmn@elego.de> writes: > > > 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] ...
Ah, very nice. I didn't know about those options. Hopefully I can use it. Thanks for pointing it out.
cmn