From: Shawn O. Pearce Date: Wed, 21 Feb 2007 18:37:54 GMT Subject: Re: removing content from git history Message-ID: <20070221183754.GK25559@spearce.org> In-Reply-To: <20070221183028.GA9088@ginosko.local> Michael Hendricks wrote: > What's a decent way to make a branch into a new repository? My first > inclination is to "cp -a" the existing repository, checkout the branch, > delete all other branches and repack. That seems to have worked in my > quick test, but is there a better way? Don't "cp -a" the repository, use git-clone. And actually, if you just want to pull one branch out into its own repository you can do something like this: mkdir ../theonebranch cd ../theonebranch git init git fetch ../oldstuff theonebranch:master and you have just the content of `theonebranch` from ../oldstuff stored here, as master. Optionally if you now want to actually see the files, you would do: git checkout -- Shawn.