We use GIT for version control at Setfive. However often with our Symfony projects creating all the ignore files in all the plugins model/base’s and other locations throughout the project get very tiresome. Since on some larger projects you can end up with 10-20 plugins, having to create an ignore for the autogenerated model, forms, and filters takes a long time. Today we really quickly just wrote a plugin that allows you to quickly just run symfony util:generate-ignores git --add-ignores
and it will automatically place the .gitignore file throughout your project in the correct locations and add them into your next commit. You can also just have it place them throughout the project, but not add them to the next commit if you drop the --add-ignores
option. The plugin also accepts “cvs” instead of git for cvs based projects.
The reason you do not want the base, om, etc. directories in your repository is because every time a person rebuilds the model they will be updating those files(many times just changing the timestamp at the top of the autogenerated files), which causes uncessarily large commits.
You can get the plugin via http://www.symfony-project.org/plugins/sfSCMIgnoresTaskPlugin or install it via symfony plugin:install sfSCMIgnoresTaskPlugin
.
If you have any questions/requests shoot us an email.
0 thoughts on “GIT Ignores and Symfony”
Comments are closed.
mppfiles says:
I use Propel, and I prefer to leave the map/om/base classes in version control.
Fortunately, Propel has an option to prevent including the timestamps you mention.
Just add propel.addTimeStamp = false in your propel.ini!
http://www.propelorm.org/reference/buildtime-configuration.html#customizing_generated_object_model