git 忽略指定文件
黄舟
黄舟 2017-05-02 09:45:25
0
2
660

git 怎么忽略指定文件

例子:
.gitignore:
/Server/0.1/gongting/*.pyc

删除/Server/0.1/gongting/ 文件夹下所有的pyc文件,我提交后,没有忽略,我用的是turtoisegit

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
刘奇

First of all, I think you need to make sure you have not added those files to the temporary storage area before. If you have added them, then .gitignore will not take effect on those files. If this is the case, you can refer to the question that has been asked in the forum - git ignores files that have been submitted.

Also, I want to know why you want to delete all those files? In fact, there is no need to do this operation. Under normal circumstances, as long as you add certain files to ignore in .gitignore, you can automatically ignore those files when submitting.

伊谢尔伦

Root directory file .gitignore

/build/
/node_modules/
/.gitignore
/.project

If it has been submitted (and you still want to keep it), delete it and submit it again, then modify gitignore, and then save it to the directory

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!