Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete my repository on Git using command line? [duplicate]

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?

like image 627
Sundararajan KS Avatar asked Sep 03 '12 07:09

Sundararajan KS


People also ask

How do I delete a Git repository from command line?

Command line Git repository delete Just run the rm command with the -f and -r switch to recursively remove the . git folder and all of the files and folders it contains. This Git repo remove command also allows you to delete the Git repo while allowing all of the other files and folder to remain untouched.

How do I delete a cloned Git repository?

On your repository list, select the GitHub repository that you want to delete. On the repository page, click on “Settings” in the menu. In the repository settings, scroll down until you see the “Danger zone“. In the “danger zone”, click on “Delete this repository“

Which command is used to delete repository in Git?

The "rm" command helps you to remove files from a Git repository. It allows you to not only delete a file from the repository, but also - if you wish - from the filesystem.


1 Answers

For local repo, run

rm -r .git

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

like image 83
linquize Avatar answered Oct 21 '22 07:10

linquize