Yesterday I started a new Git repo, then copied source files from a TFVC repo into the Git repo. (I believe I got rid of all the TFVC related files.) I’m using Visual Studio 2019. After I created the local repo and pushed to remote, I realized that I’d forgotten to include the
.gitignore file, so I went onto GitHub, found the relevant
.gitignore for Visual Studio, and put it into the root of the repo. I thought that would be the end of it.
But I’m wrong. Every time I open the project with VS 2019, I’m presented with some files which Git sees ask having been modified, but not staged. For example, this is what I’m seeing now:
I’ve previously performed a
git restore <file> on files like the .suo file, but it still comes back. Files like .suo, .dll and .cache are all in the
.gitignore file, so why aren’t they being ignored? Is the order in which I added the
.gitignore file important? How do I fix this so that it will stop bothering me?