git中使用【checkout .】命令放弃修改,为何新建的文件夹和文件不会被删除掉呢
PHP中文网
PHP中文网 2017-05-02 09:48:23
0
2
702

我想用checkout . 放弃修改,可是发现新建的文件夹和文件夹内的内容并没有被删除掉。。

PHP中文网
PHP中文网

认证0级讲师

reply all(2)
習慣沉默

Because the newly created folders and files are ‘Untracked files’, you can use git clean -fd if you want to discard them.

过去多啦不再A梦

Two methods to obtain the git repository:
git init and git clone. The newly added files (including folders) after these two commands are not included in the git repository management. At this time, the status of git st is: Untracked files, which is required Only manual git add can be included in the git warehouse, otherwise git will be out of control.
For such files newly added to the working directory, there is a special command for reverse operation: git clean -fd. You can use man git clean to view command instructions.

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!