0

I have an ASP.NET solution with one MVC project in it.

Lets call

  • the path of my .sln file is the root-folder.
  • the path of my .csproj file is the MyProject-folder

I added the gitignore file from within VS2019: Team Eplorer -> Repository Settings -> Ignore File -> Add

The gitignore file was created in the root-folder, as expected.

But on any build, the files of the obj and bin folder were found as changes.

I tried to move gitignore file inside the MyProject-folder, so then bin/obj files were correctly ignored. BUT git started tracking root-folder/.vs/* files, which is not wanted off course.

What would be the correct place for the gitignore file?

zrrbite
  • 1,180
  • 10
  • 22
cnom
  • 3,071
  • 4
  • 30
  • 60
  • 3
    Have you added those files to the repo *before* creating the `.gitignore` file? Adding a `.gitignore` file won't remove any files already in the repo. – Panagiotis Kanavos Oct 09 '20 at 12:51
  • which files? the dll build files in bin? yes.. probably.. i am now checking the solution you suggest. – cnom Oct 09 '20 at 12:53

0 Answers0