Before I even create my ASP.NET Core project I first create my git repository and select the initial gitignore template to be VisualStudio. I then added the line:
wwwroot/lib/
After committing and publishing this change I then created my ASP.NET Core Web Application project using the standard Web Application template to start with, and it still shows the brought in jquery and bootstrap files pulled down by bower as modified files ready to be committed? Is there a step I am missing here to prevent these as showing up as modified?