本地仓库 - git 如何删除本地创建的仓库
漂亮男人
漂亮男人 2017-05-02 09:22:04
0
3
628

git 在本地创建了一个仓库并添加了文件,现在这个本地仓库不想要,怎么删除?而且不会删除仓库里面的文件?

漂亮男人
漂亮男人

reply all(3)
Ty80

Solution

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

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!