Git has a helpful ability to ignore certain files. When working on .net projects, you normally want to ignore your .suo file, bin and obj folders etc.
If you’re using the excellent GitExtensions it will even provide a default, reasonable .gitignore file for you.
Problem is, that while you want to ignore certain patterns in most of your project, generally you want none of those rules to apply to your nuget packages.
Everything in packages folder should be committed. Always. No exceptions.
To do that, you need to leverage a child .gitignore file.
Create a .gitignore file inside your packages folder and add the following line to it:
This tells Git to disregard any ignore rules of the parent file. Now all your packages will be committed completely, without missing any of their functionality.