Q:

Symfony 2 deploy git files

I want to upload files to my server and question is: what should I do with git repos (bundles) in my project? 
Currently my project is 100 Mb, so my second question is why it is so big, if I have removed log and cache files. 
I want to cleanup project.  I don't want to upload .git files. 

A:

I generally find it useful to keep the repository files on the server as it helps tracking which version is online and tends to make updates easier, unless you build packages for your application.  100M is not that much on most hard drives anyway. 
If you really want to upload the files alone, without the git repository information, you can simply clone your application elsewhere and strip out all git files. 
From the root, you can run:
find .  -name .git | xargs rm -Rf

