Search code examples
gitgitignore

.gitignore adding all files in folder recursively to white list?


This looks like basic, thing but I just can't find any good examples. So I have a solution that contains bin folder with DLLs inside. I want them ALL to be pushed to the repo no matter what global .gitignore says. So should I write in local .gitignore

!/*.*
OR
/*.*

?


Solution

  • Add !/path/to/files/*.* or !/path/to/files/* to the .gitignore file. You could tweak it further by specifying the extension of the DLLs by using !/path/to/files/*.ext to be more specific.

    Hope that answers the question?