From: Junio C Hamano Date: Thu, 16 Jul 2009 20:47:01 GMT Subject: Re: Make a non-bare repo bare. Message-ID: <7vd4808iey.fsf@alter.siamese.dyndns.org> In-Reply-To: Mike Ralphson writes: > 2009/7/16 Graeme Geldenhuys : >> Junio C Hamano wrote: >>> >>> Funny. >>> >>>    http://article.gmane.org/gmane.comp.version-control.git/123303 >>> >>> It is posed as a question but describes the correct (and officially >>> supported) procedure. >> >> >> Now it deserves to be in some Git FAQ. It seems the issue is more common >> than I thought. :-) > > It already is > > http://git.or.cz/gitwiki/GitFaq#HowdoImakeexistingnon-barerepositorybare.3F > > unless that's new? Somebody needs to promise to keep that entry up-to-date, or we should rewrite it so that we do not expose such an implementation detail. Even today core.bare is not the only difference between a repository with a work tree and a bare one. We also set core.logallrefupdates these days for a repository with a work tree, so the procedure described there is already stale. And this kind of implementation details are bound to change. Asking git what to do is the only reliable "cut-and-paste-ready" recipe.