I have a standard asp.net MVC git ignore file where it is instructed to ignore all dll files. But in my Project, I am referencing some third party dll's. Now how can I make the gitignore to allow only this dll's and ignore other dll's.
I have seen people adding ! before the file name to exclude. But this is not working for me. I don't know why?
Actual gitignore file:
###################
# compiled source #
###################
*.com
*.class
*.dll
*.exe
*.pdb
*.dll.config
*.cache
*.suo
# Include dlls if they’re in the NuGet packages directory
!/packages/*/lib/*.dll
!/packages/*/lib/*/*.dll
# Include dlls if they're in the CommonReferences directory
!*CommonReferences/*.dll
####################
# VS Upgrade stuff #
####################
UpgradeLog.XML
_UpgradeReport_Files/
###############
# Directories #
###############
bin/
obj/
TestResults/
###################
# Web publish log #
###################
*.Publish.xml
#############
# Resharper #
#############
/_ReSharper.*
*.ReSharper.*
############
# Packages #
############
# it’s better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
######################
# Logs and databases #
######################
*.log
*.sqlite
# OS generated files #
######################
.DS_Store?
ehthumbs.db
Icon?
Thumbs.db
[Bb]in
[Oo]bj
[Tt]est[Rr]esults
*.suo
*.user
*.[Cc]ache
*[Rr]esharper*
packages
NuGet.exe
_[Ss]cripts
*.exe
*.nupkg
*.ncrunchsolution
*.dot[Cc]over
/.vs
/Content
/Images
/Scripts
/Views
/favicon.ico
/Global.asax
/Web.config
At the end, I tried adding !bin/myLib.dll and !myLib.dll. This is not working.
Can somebody help me to solve this? so that I can included those dll files.