I have a gitignore file that makes git ignore *.dll
files, and that is actually the behavior I want. However, if I want an exception ( i.e. to be able to commit foo.dll
), how can I achieve this?
Use:
*.dll #Exclude all dlls
!foo.dll #Except for foo.dll
From gitignore:
An optional prefix ! which negates the pattern; any matching file excluded by a previous pattern will become included again. If a negated pattern matches, this will override lower precedence patterns sources.