0

I am currently cleaning up a git-repository, moving dependencies and so on. I have decided to have a global folder which contains all third-party libraries that we use. Except for these *.dll files, I want to ignore any other dll-Files in the project.

So my gitignore in the root directory of the project contains these lines:

*.dll
!external\ libraries/*.dll

Which apparently does not work. I also tried placing a .gitignore file into the external libraries directory, containing the line !*.dll, which did not work either.

What am I doing wrong?

e/

Output of ls in external libraries

/external libraries (branchname)
$ ls
file1.dll*
file2.dll*

In the root directory ls returns all folders as expected.

1615903
  • 32,635
  • 12
  • 70
  • 99
Marv
  • 748
  • 11
  • 27
  • i guess all other dll are in a bin folder, so ignore "bin\*.dll", does it resolve your issue? AFAIK with "!" you can only specifify a single file or folder not to be ignored. – Tom Söhne Aug 04 '16 at 08:52
  • Weird, but this seems to work when I tried to reproduce your problem. Can you share the output of `ls` in your relevant directories? – Mureinik Aug 04 '16 at 08:53
  • I ignored the bin folder now @TomSöhne and removed any other ignores of dll files. I even refreshed the cache of the gitignore but those files still do not show up on `git status` – Marv Aug 04 '16 at 09:13
  • I edited into the question @Mureinik – Marv Aug 04 '16 at 09:17
  • Cannot reproduce: http://pastebin.com/MSJcF2st – 1615903 Aug 04 '16 at 09:54
  • 1
    To find out which rule is actually ignoring the files, see this: http://stackoverflow.com/a/12168102/1615903 – 1615903 Aug 04 '16 at 09:58
  • @1615903 Checking which file blocks the dlls helped me out, thank you. – Marv Aug 04 '16 at 10:02

1 Answers1

0

I checked via git check-ignore -v filename how the file was blocked and apparently at some point a global gitignore file was created on my computer. Deleting it resolved my problem.

Marv
  • 748
  • 11
  • 27