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.
Git ignores folders if you write:
/js but it can't add exceptions if you do: !/js/jquery or !/js/jquery/ or !/js/jquery/*
You must write:
/js/* and only then you can except subfolders like this
!/js/jquery
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With