Deployment via git pull: how to deal with files uploaded by users?

0

Let's say I have a Wordpress or phpBB3 project. I can easily deploy both by ssh'ing into a server, cloning repository in public_html and pulling master each time I need to deploy it.

What if between 2 deployments my Wordpress user will put something into /wp-content/uploads or my phpBB3 board member will upload his new avatar to /images/avatars/uploads?

I could git ignore these directories but on the other hand I consider user specific content as part of the repo and I want to keep it within repository.

What is the best way to approach this? Before each git pull should I manually downloads all uploads / avatars and commit to master and then pull with all files as part of regular release?

Sorry for lack of code, but the nature of this question requires no code to show.

Thanks for any hints.

Matt Komarnicki

Posted 2019-08-13T11:36:41.660

Reputation: 155

No answers