N
N
Nikolai Stupak2014-10-19 15:12:31
git
Nikolai Stupak, 2014-10-19 15:12:31

Why doesn't the pattern work in .gitignore?

there are files in the git repository directory:
subprojects/subproject1/data/some_text.some_text.graphml
subprojects/subproject1/data/some_dir/some_text.some_text.graphml
I made a template for them in gitignore, which looks like this:
subprojects/subproject1/data/ **/*.graphml
but it doesn't work, files are not ignored anyway. Empirically established that if there is no dot in the file name, i.e. for example, if the file name is subprojects/subproject1/data/some_text.graphml, then the template is triggered and the file is ignored. Tell me, what's the problem? and how to make git ignore a file with a dot in its name?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Power, 2014-10-19
@nikolaas

I created a test repository, and with your template all 3 files are successfully ignored:

subprojects/subproject1/data/some_dir/some_text.some_text.graphml
subprojects/subproject1/data/some_text.graphml
subprojects/subproject1/data/some_text.some_text.graphml

Maybe you have some very old version of git?
And a stupid question: are you sure these files are not already under version control?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question