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

Selective Folder Sync - How To? #212

Open flow7 opened 2 years ago

flow7 commented 2 years ago

Hi there, I've just installed this plugin and really love it. However - I can't quite figure out how to just sync the things I actively work aka one theme ie. MyTheme and one particular plugin ie MyPlugin

When I first install the plugin, the Wizard leaves me no choice but to choose the entire Themes and Plugins folder. And then syncs the whole thing :( When I later edit those entries by writing /themes/MyTheme and /plugins/MyPlugin in the settings I'm informed that removing folders after syncing doesn't work well, or so.

Any recommendations how to achieve the selective sync? And how to avoid populating the github repo with all the other folders from /themes and /plugins, that I don't need synced (i think) ? Thanks a lot

w00fz commented 2 years ago

That's the way to go about it, you remove themes and change it to your specific one (ie, themes/quark).

The notice is about when you do this switch, the undesired effect are that GitSync might not be able to properly remove the folders pushed that you now want removed, so that is something you might have to clean up manually yourself. After that it should just work fine and only sync your on theme/plugin.

Hope this helps!

flow7 commented 2 years ago

thanks for the fast reply!! 👍

Beginner question: where do you recommend me to remove those folders? As in, I want to keep them in my grav setup, but remove them from the synced stuff. Shall I delete from the Github repo?

w00fz commented 2 years ago

Yes you definitely want to keep these folders in your environment but then remove them from GitHub. Make sure you do save the GitSync configuration with the new folders setup first, otherwise they will be pushed back into GitHub.

flow7 commented 2 years ago

Thanks - will try later today and report back back ;)