trilbymedia / grav-plugin-git-sync

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

Isolate content from settings using more than one repo #126

Open McGlear opened 5 years ago

McGlear commented 5 years ago

tl;dr: As an enhancement, it could make sense to allow the setup of several independent repos, one for each user/* folder to be synced. That way, we could version control sensitive data in private repos while leaving page-content or themes public, have more straight-forward access control (developer vs. author) and maybe even avoid some of the "where does git-sync push to" confusion.

Long version: I am looking for a way to more clearly isolate content (user/pages) from the rest of the user folder.

There have been some discussions on where git-sync should push to or how to use a seperate user/pages directory (#34, #54, #25, etc.) but while it is now possible to select which user/ folders to sync and where in the repo to store them, I still don't see an easy solution to accomplish isolation*. On the contrary, the plugin even reminds us to make sure our repo is secure and private when we want to sync potentially private data (thus eliminating one of the advantages of git: collaboration), rather then giving us tools to have private data in a private repo and more public data in another one.

If we could setup one repo for each folder to be synced, we could acomplish isolation, more fine-grained access control (and even a cleaner commit history as content editing becomes independent from administration-commits).

shymega commented 4 years ago

I'm particularly keen to see this implemented, if possible. Has there been any progress on that front? Thanks :smile:

ghost commented 3 years ago

As a workarround, if you only need to make change through the admin pannel to one directory, you could ignore the other directory (simply avoid to put them in the plugin's directory list) and uses some CI/CD to rsync or git pull the other directories.