How to ignore specified files in git
Example:
.gitignore:
/Server/0.1/gongting/*.pyc
Delete all pyc files in the /Server/0.1/gongting/ folder. After I submitted them, they were not ignored. I used turtoisegit
怪我咯2017-05-02 09:47:25
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.
伊谢尔伦2017-05-02 09:47:25
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