0

I have inherited a Visual Studio project, and the git repo did not include a .gitignore file. I downloaded the one located here https://github.com/github/gitignore/blob/master/VisualStudio.gitignore and pushed it to all branches (we maintain several versions of the project and have a separate branch for each).

However, whenever I open the project in Visual Studio, git is still tracking the .user files generated by VS, even though they are included in the .gitignore file.

Have I missed a step somewhere?

Cam
  • 2,026
  • 3
  • 25
  • 42

2 Answers2

1

Try to use git rm -r --cached .vs/. After commiting it, you can add visual studio files again, they should be ignoring

0

What's the directory .user file present in?

Try to check .gitignore has ignored or not by below command. git check-ignore -v -- afile

If still not solving, keep an example with sample file, will give exact commands

Pradeep G
  • 31
  • 4