trilbymedia / grav-plugin-git-sync

Collaboratively Synchronize your Grav `user` folder hosted on GitHub, BitBucket or GitLab
Apache License 2.0
243 stars 58 forks source link

Disable sync of gitsync plugin folder #129

Closed alexanderperrin closed 5 years ago

alexanderperrin commented 5 years ago

Hi there,

I’m trying to configure my development/deployment process for my local and production environments. I have setup git sync and it’s behaving well generally speaking, though I’m struggling to understand how I can disable the plugin on my local machine while continuing to have plugin folder sync and auto sync working on the remote server.

As it stands I have everything syncing, but I don’t wish for my local to be auto synced when making changes, I would prefer to commit these changes manually via my git client.

Has anyone else had experience with this sort of setup?

Please let me know too if there’s a better place to ask this question. I’m relatively new, so please excuse me!

Thank you.

w00fz commented 5 years ago

You should check out Grav environments. That’s how I really like to setup my local vs prod. I have my https://trilby.local where i do all my development and then production site.

In my user config i then have a user/trilby.local/config folder where I customize for development like enabling debugbar, disabling cache, etc. Then I either have a user/mysite.com/config with settings optimized for prod or I just set the default under user/config to be that way.

This is the way I’d suggest to go, makes it beneficial not only for your specific scenario with gitsync but also for having a ready to go optimized configuration for production vs development.

https://learn.getgrav.org/advanced/environment-config

Hope this helps.

alexanderperrin commented 5 years ago

Oh that’s absolutely perfect. Great solution, I don’t know how I didn’t come about this sooner. Thank you so much and more so for the speedy response.