user2535835
user2535835

Reputation:

How do you handle compiled files from pre-processors in git commits?

We all like those meta languages like SASS/SCSS, LESS, Coffeescript, etc. But when it comes to git commits there is one question: Should compiled files from my source files get into the repo or is it better to ignore them? The problem is, when ignoring those files, one could not simply use the repository out of the box. You've to compile it first (to the right location) before using it. This is kinda bad way, because not everyone using pre-processors. So how to deal with it?

Upvotes: 0

Views: 969

Answers (1)

qqx
qqx

Reputation: 19475

Git is generally used as a source-tracking system, and as such is meant for use by developers of the project. For people to do development on the project they will need to be able to build from source files into the generated files. So in this case not having the generated files in the repository doesn't impose any additional burden on them.

To be useful for end-users, you may want to do periodic releases of the project. These would typically be done as archives of the necessary files. This would generally include generated files, and quite-possibly exclude the source files. For an end-user even git itself is likely to be seen as an unnecessary tool.

Including generated files in the repository doesn't help either of this class of people, and it makes it more difficult to see what is actually being changed by each commit.

Upvotes: 2

Related Questions