16

Possible Duplicate:
How to fully delete a git repository created with init?

I have a test repository on git and I want to delete it using command line. I found that git rm <file> deleted the files within the repository and not the repository itself. Any one can help here?

Community
  • 1
  • 1
Sundararajan KS
  • 699
  • 1
  • 7
  • 8
  • 1
    You just delete the `.git` hidden folder (not using git commands) – Iulius Curt Sep 03 '12 at 07:29
  • Although some of the participants in this thread have reported that this is not possible, the following link to a newer thread demonstrates that it is indeed possible: http://stackoverflow.com/a/19327004/2112489 To be fair, this particular thread is a couple of years old, so perhaps this is a newer feature in the API. – lawlist Apr 13 '14 at 21:27

2 Answers2

17

For local repo, run

rm -r .git

You may not delete a repo remotely to github via command line.

linquize
  • 19,828
  • 10
  • 59
  • 83
  • 1
    Thank you for your answer. What do you mean with *You may not delete a repo remotely to github via command line.* ? We shouldn't delete the repository locally first ? Or on GitHub first ? – Revolucion for Monica Jun 22 '17 at 09:09
3

try

rm -r .git

from the root of the repository.

tback
  • 11,138
  • 7
  • 47
  • 71