Search code examples
gitgitignore

Exceptions in .gitignore


How can I add an exception to .gitignore, like "ignore all the .dll files BUT myfile.dll"?


Solution

  • Use ! to negate the pattern:

    *.dll
    !myfile.dll