开发者

How to Git Ignore Contain "tiu" Word Files

开发者 https://www.devze.com 2023-03-29 13:24 出处:网络
the category like: /Script/tiu_adfsfdfdsff.js /Script/tiu_adfsfdfdsff.js ... /CSS/tiu_adfsfdfdsff.css /CSS/tiu_adfsfdfdsff.css开发者_如何学Python

the category like:

/Script/tiu_adfsfdfdsff.js
/Script/tiu_adfsfdfdsff.js
...
/CSS/tiu_adfsfdfdsff.css
/CSS/tiu_adfsfdfdsff.css开发者_如何学Python
...

i want to ignore contain "tiu" files

my .gitignore files is:

CSS/tiu*.css
Script/tiu*.js

but it don't work?


if you want to ignore all the tiu* files, use a global pattern (without specifying the directory at first):

tui*.css

If this does not work, here are the rules for patterns: http://git-scm.com/docs/gitignore


If they're already added to the repository, you need to remove them from the repo without deleting the files. Do that with:

git rm --cached /Script/tiu*

That will remove the objects from the repo and the index, but leave the working directory alone. From then on, they should be happily ignored by git status and git add (and by extension git commit -a).

0

精彩评论

暂无评论...
验证码 换一张
取 消