To stop tracking the files in the gitignore file;
Open a command prompt and navigate to the directory that contains your solution file (.sln), then run the following commands (first two commands contains dot at last):
- Remove all of the items from the Git index (not from the working directory or local repository):
git rm -r --cached .
- Update the Git index according to gitignore:
git add .
- Commit changes:
git commit -am "Remove ignored files"
Then open your Visual Studio and sync your repo.
That seemed to do the trick for me. I found the git commands here.