From: Alex Riesen Date: Fri, 15 Jun 2007 14:18:41 GMT Subject: Re: Newbie questions about moving around repositories Message-ID: <81b0412b0706150718t2382648aw25959844f52c5c02@mail.gmail.com> In-Reply-To: <1b5a37350706150652y7710c380l79e785cba8f6b02e@mail.gmail.com> On 6/15/07, Ed Schofield wrote: > 1. I would like to move my repository (including all branches) from > directory A to a directory B on a different filesystem. Can I use > git-clone for this? It seems that git-clone creates remote-tracking > branches, but I want to keep all of the branches as local branches so > I can remove the original repository. Just copy it. > 2. I can't just move the entire directory A, because I get > > Error in startup script: error: object directory > A/../A-cvs-git/.git/objects does not exist; check > .git/objects/info/alternates ... but fix that .git/objects/info/alternates files in the repos left to point to the new location of the moved directory. > I think I originally created the repository by cloning from my > A-cvs-git/ directory with git-clone --shared, but I don't quite > remember. So I suppose I want a way to stop using the alternates > mechanism and make my repository self-contained in one directory. Is > this possible? git repack -f, and remove the alternates, probably. Otherwise you can just copy .git/objects directory into all related repos, remove alternates there and you're free. > Will I then be free to move the directory? Yes