Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why IDE-specific project files are ignored in Git?

Tags:

git

github

ide

I have seen that a number of projects posted on Github feature a .gitignore file explicitly excluding control files related to the IDE. These control files are widely used to define the project and its dependencies. These can be .sln for .NET or .project for Eclipse.

I want to ask why is this practice widely applied or considered a good practice, considering that I agree that achieving IDE-neutrality (don't bind developers to a specific IDE) is a good principle, in general.

On the contrary, these control files often dictate project dependencies, configuration or compilation variables in multiple configurations (this is the case of the .csproj files for example).

I have seen a large number of open source projects ignoring Eclipse files, however it has been impossible to me so far to set up a development environment without the project files (even if I create a project from existing code, or create a new project and import the code, I always get plenties of compilation errors).

If the project files were present in repositories it would be vry simple to set up a development environment with "download the code, import the project and voilà compile the source" but it would obviously bind developer to a specific IDE (and that's not funny).

Standardizing or migrating project files is out of the scope of the question.

So, from an external contributor's point of view, how does one build up a working and compiling project environment for a project of which he downloaded the source code from Github? (after cloning all submodules, if needed)

Just to pick one example project I would like to import into Eclipse, analyse and slightly modify, here it is.

like image 606
usr-local-ΕΨΗΕΛΩΝ Avatar asked Dec 20 '22 10:12

usr-local-ΕΨΗΕΛΩΝ


1 Answers

Notice that csproj files are not IDE specific but instead form the basic project structure and build steps of a .NET project. Even if you switch to a completely diffferent IDE like SharpDevelop you still need them to get the project running. So, in general those shouldn't be on the .gitignore file. Only the things that are user or IDE specific should be excluded.

like image 113
Christoph Avatar answered Dec 30 '22 02:12

Christoph