Bastian Bastian - 1 year ago 69
Git Question

.gitignore does not work for **/*.xyz

My git project contains .cas files that I do not want to be pushed to the repository. I thus added the line


to my
file but
files would still appear in
git status
After reading through numerous other posts I checked for the
entries to not have trailing white spaces and that they do have unix line change specifiers.

I then ran the following commands as advised here:
.gitignore does not work

git rm -r --cached .
git add .

but in vain!
git status
still reports e.g.

new file: calc/2_preliminary/1_CFD/7_Calc_Fluent/03_stationary_vof_stationary/mesh_04/run_10000.cas

Any ideas? I would really appreciate it.

Answer Source

You said in comments that you use git v1.7.1. Old git version is the problem. **/ pattern was added only in 1.8.2, so your git just doesn't understand it. Besides, you don't really need the **/ part, you should use just

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download