I develop WordPress themes and I use git for version control. I use a git repo for each theme. The most of the time I am fixing and developing themes so I only need to push little changes to some theme. Because of that I only have the themes synchronized but I have differents plugins and content.
Now I want to completely sync my local and online WordPress installations to make any change in local, including create the content and make plugins and core updated.
I have found a plugin that allow to sync the database and media files. But what happens with plugins and all the wordpress core files?
I can make git repo of all the wordpress install, but I don’t want to push all the installation because a little change in one theme. I need to track each theme apart.
Is there a way to make a repo of all WordPress, excluding themes, and maintain the repos I already have for the themes?
Finally, my approach has been to create a git repo of all the WordPress files excluding wp-content/plugins and wp-content/themes with the .gitignore.
So then, I have a repository for plugins, a repository for each of my themes and another repository for all the other files. This plus the WP Sync DB plugin allow me to have my local and production environments completely synchronized.
I hope this help someone!