tags:

views:

7796

answers:

2

I created a git repository with git init. I'd like to delete it entirely and init a new one.

+20  A: 

Git keeps all of its files in the .git directory. Just remove that one and init again.

Kristof Provost
I never read this anywhere, but I was doing this all the time. This post is reassuring. +1
jeffjose
+12  A: 

If you really want to remove all of the repository, leaving only the working directory then it should be as simple as this.

rm -rf .git

The usual provisos about rm -rf apply. Make sure you have an up to date backup and are absolutely sure that you're in the right place before running the command. etc., etc.

Charles Bailey