Konrad Viltersten Konrad Viltersten - 21 days ago 5
Git Question

Why has the git ignore file nothing mentioned about excluding files in \obj directory?

I'm still feeling out my way around Git so it might be a stupid question. Sorry in advance, if so, but I haven't found a clear answer to it when I googled.

In this blog it's suggested that one should use the default ignore file for Git. However, I noticed that while the directories like bin and debug are present in that list, obj isn't.

As far I'm aware, those are not files that we want to version control. Those will be automatically recreated when rebuilding. How come the ignore file doesn't mentioned them?


It actually does mention the obj directory, see this line:


The square brackets ensure that the folder is ignored regardless of whether the first letter is upper or lower case.

And yes, you are correct that any files that are automatically generated as part of the build process should not be committed to the Git repo.