84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
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