Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Git Ignore Contain "tiu" Word Files

Tags:

git

gitignore

the category like:

/Script/tiu_adfsfdfdsff.js
/Script/tiu_adfsfdfdsff.js
...
/CSS/tiu_adfsfdfdsff.css
/CSS/tiu_adfsfdfdsff.css
...

i want to ignore contain "tiu" files
my .gitignore files is:

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

but it don't work?

like image 328
artwl Avatar asked Aug 18 '11 10:08

artwl


People also ask

How do I ignore a text file in Gitignore?

You have the option to use double Asterisk (**) to match any number of directories and files. For example, Test/**/*. txt will tell git to ignore only files ending with . txt in the test directory and its subdirectories.

How do I force git to ignore a file?

Use Git update-index to ignore changes Or, you can temporarily stop tracking a file and have Git ignore changes to the file by using the git update-index command with the assume-unchanged flag.

How do I ignore files in a folder in git?

Personal Ignore Rules Patterns that are specific to your local repository and should not be distributed to other repositories should be set in the . git/info/exclude file. For example, you can use this file to ignore generated files from your personal project tools.


1 Answers

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

like image 172
mort Avatar answered Sep 19 '22 18:09

mort