Re: Multiple checkouts of the same repository
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 1, 2006, 19:08 UTC
- Message-ID
- <Pine.LNX.4.63.0610012105590.14200@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <3bbc18d20610011203p40d631b7o3bd2c6971a2bfcca@mail.gmail.com>
Hi,
On Sun, 1 Oct 2006, Matt McCutchen wrote:
Show 6 quoted lines
> Maybe this is common knowledge, but I thought I should mention it in > case it isn't. I had a git repository in a directory A and I wanted > to check out a branch of the repository to a different directory B. > So I created B/.git and filled it with symlinks pointing to the files > in A/.git, except for index and HEAD because those need to be > different for each checkout;
A better method is to use a local clone:
git-clone --local --shared A B
Such a clone will be very fast, and cheap, because it sets up links (not just symbolic links, but links that git understands).
Hth, Dscho