0

I have recently started playing around with Capistrano for my PHP projects, I have it working great on a static site, however the majority of my projects are built on a CMS, the most common one is Concrete5.

The problem I am having when it comes to a CMS driven sites is that a bunch of the content of the site is uploaded files which I do not want in my git repository but they need to exist within a folder that is in my repository. As an example, all of my code within a concrete5 site lives inside /application, but the user uploaded files live in /application/files. How can I preserve this folder between versions?

I have done a ton of googling on this and haven't been able to find a decent answer, I'm not sure if I am searching for the correct term though.

Many thanks in advance.

Dave Essery
  • 207
  • 1
  • 12
  • Let me understand your question, you want conserve this folder in your commits, but you want ignore the files inside?, if is that you need create a gitignore inside of this folder, you can see the answer here http://stackoverflow.com/questions/115983/how-can-i-add-an-empty-directory-to-a-git-repository – Ezequiel García May 03 '16 at 14:38
  • Hi @EzequielGonzálezGarcía, thanks for your reply. Not quite though. When you deploy with Capistrano you point apache (in my case) to load from the Current symlink that points to the folder with the latest deployment version of your code. Basically I need that files folder to exist within each deployment, because it should effectively live in current/application/files, however it is not tracked by Git (already excluded with gitignore) so it does not get deployed with the rest of my project. I hope that makes sense. Thanks – Dave Essery May 04 '16 at 14:12

0 Answers0