git 在本地创建了一个仓库并添加了文件,现在这个本地仓库不想要,怎么删除?而且不会删除仓库里面的文件?
You can clear the git files in the local folder first, and then re-initialize the new git repository
//删除文件夹下的所有 .git 文件 find . -name ".git" | xargs rm -Rf
Then add, commit and other operations
If the command line operation is really weak or cumbersome, you can use visual tools such as sourceTree to perform git operations, which should be simpler
Directly clear the .git folder manually (non-violence and non-cooperation), and then init
I tried it, it works, thank you
Solution
You can clear the git files in the local folder first, and then re-initialize the new git repository
Then add, commit and other operations
Extensions
If the command line operation is really weak or cumbersome, you can use visual tools such as sourceTree to perform git operations, which should be simpler
Directly clear the .git folder manually (non-violence and non-cooperation), and then init
I tried it, it works, thank you