How to fully delete a git repository created with init? -Delete git repository

DevOps

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

2
Answers

Replies

Navigate to the repository that you have initiated git in. Execute the below command.



rm -rf .git



It leaves the working directory as is.

 

All you have to do is remove the .git file. It holds all the files. It will be hidden in the directory that you have initiated. 

 
 

If you want to unleash your potential in this competitive field, please visit the DevOps course page for more information, where you can find the DevOps tutorials and DevOps frequently asked interview questions and answers as well.

 

This topic has been locked/unapproved. No replies allowed

Login to participate in this discussion.

Leave a reply

Before proceeding, please check your email for a verification link. If you did not receive the email, click here to request another.