-1

I have a Git repository with several projects created with .NET, with a layered structure where each layer is stored in sub folders, but when I compile my complete solution, many modified files appear in the repository that should be ignored.

Such as the folder .vs/, obj/, bin/, among others.

enter image description here

My git ignore file is in the solution root folder.

enter image description here

Inside the file I have the configurations that I used in old projects, the difference that I have is that this solution consists of several solutions saved in sub folders.

enter image description here

Magdaleno
  • 35
  • 5
  • It’s clearer if you just copy the contents of your `.gitignore` into a codeblock (instead of the image). – Guildenstern May 01 '23 at 19:12
  • I think I tend to use `git ls-files` when I want to check if files which I _think_ are ignored really are. – Guildenstern May 01 '23 at 19:13
  • If you have files already pushed to remote, adding to `.gitignore` will not work straight away. First you need to delete files from remote and then add to `.gitignore`. (Not sure if this is the case here but keep in mind) – levangode May 01 '23 at 19:58

1 Answers1

1

The .gitignore rules applies only for not tracked files.

So if you want to ignore all these files, you have to untracked them and commit this "deletion":

https://stackoverflow.com/a/41051500/717372

Philippe
  • 28,207
  • 6
  • 54
  • 78