# "strip" the repo

2 messages from 2007-04-20 to 2007-04-20. Participants: Yakov Lerner, Petr Baudis.
Thread: https://gitlist.dev/t/7757

## Yakov Lerner, 2007-04-20 19:28

Subject: "strip" the repo
Message-ID: <f36b08ee0704201228v40e95ac1h8f541b14feb2cede@mail.gmail.com>
URL: https://gitlist.dev/e/f36b08ee0704201228v40e95ac1h8f541b14feb2cede%40mail.gmail.com

```
I am curious, if I remove all files and dirs (except .git),
and index, will it make it a valid bare repo ?
Or switching the repo from non-bare to bare is difficult ?

Thanks
Yakov

```

## Petr Baudis, 2007-04-20 20:31

Subject: Re: "strip" the repo
Message-ID: <20070420203104.GQ4489@pasky.or.cz>
URL: https://gitlist.dev/e/20070420203104.GQ4489%40pasky.or.cz
In-Reply-To: <f36b08ee0704201228v40e95ac1h8f541b14feb2cede@mail.gmail.com>

```
On Fri, Apr 20, 2007 at 09:28:02PM CEST, Yakov Lerner wrote:
> I am curious, if I remove all files and dirs (except .git),
> and index, will it make it a valid bare repo ?
> Or switching the repo from non-bare to bare is difficult ?

Yes, just removing everything except .git and .git/index (optionally)
will work fine to create a bare repository. Maybe a simpler way (but
more expensive) is to git clone --bare the repository.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
		-- Samuel Beckett

```
