roundcrisis roundcrisis - 1 year ago 183
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?

Answer Source


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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download