roundcrisis roundcrisis - 3 months ago 58
Git Question

git ignore exception

I have a gitignore file that makes git ignore

files, and that is actually the behavior I want. However, if I want an exception ( i.e. to be able to commit
), how can I achieve this?



*.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.