If you have excluded dll files from your git repository with your .gitignore file but DO want to include them when they have been added via the NuGet package manager, you can add this after the dll exclude.
# Include dlls if they’re in the NuGet packages directory
!/packages/*/lib/*.dll
Thanks this was what I was looking for. But there are some cases where the dll files are in network specific folders under the /packages/*/lib folder. So for those, you will need to add the second line below also…
# Include dlls if they’re in the NuGet packages directory
!/packages/*/lib/*.dll
!/packages/*/lib/*/*.dll
[…] that I’d also have to handle DLLs and other files and references set up by NuGet – this blog entry has the following […]