How to Remove & Delete a Local Git Repository

Cameron McKenzie
Cameron McKenzie
78.4 هزار بار بازدید - 3 سال پیش - Need to delete a Git
Need to delete a Git repo? Was the local repo to delete created with Git init?

If you are having a problem deleting your local Git repo, we have the solution to your problem. Just run the following command:

rm -fr .git

That command will delete the hidden .git folder in which all of your local Git configuration for the local repository is stored. Once that Git repo delete command is performed, the local git repository will be gone for good.

Another option is to just unhide all hidden directories. That's why the deletion of a Git repo causes people problems - they don't realize the .git folder is hidden. But if you unhide it, you can just do a right-click and delete, and the local Git repo will be removed for good.
3 سال پیش در تاریخ 1400/07/13 منتشر شده است.
78,409 بـار بازدید شده
... بیشتر