Reputation: 12377
I have a question about Git and the best strategy to handle source-files vs. output-files (a file that is rebuildable with the sources).
Lets say I have some source-files and also some output-files (e.g. the product of a compiler; generated makefiles).
Normally I would say I only want to have the sources in my repo.
Today I see the following ways to handle it.
a) Manually pick every sourcefile with git-add. But thats a lot of work compared to git-add *.
b) Go easy and git-add anything (. or *). But then the sources are in the repo too. Also possible to have a modified file but no source changed (e.g. a output-file with a timestamp included).
c) Set .gitinore to exclude output-files. That can be also some work because in some project there are a lot of different forms of them.
d) Set .gitignore to ignore all but whiltelist the sources. I think thats less work than §c. But with the danger to miss something if not on the watch.
So what do you think is the best way OR a common strategy? Thanks!
Chris
Upvotes: 0
Views: 47
Reputation: 1382
a.
Its a one time activity.
Its extremely simplified if your build system has a clean option.
Upvotes: 1