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

Question regarding a grav site under git already #127

Closed rchady closed 5 years ago

rchady commented 5 years ago

I have a grav site up and working and everything is under git control. When a change is made outside of user, the new version gets pushed to the website and it publishes a new copy of the content -- meaning it fully recreates the directory and after everything is ready it updates a symlink. This is how capistrano, etc work.

Now, my question is, why can't I get this plugin working to sync up changes to the folders in user and still use the repo it is a part of already? The plugin seems to try to create a new clone just for those folders, even if it is already operating inside a repository clone.

I would have expected that any changes that occur in user/ would trigger a 'git add; git commit; git push' type operation and it would just use the repository it is already in? Should it work this way and I did something wrong, or isn't it meant to operate this way?

Thanks in advance!

w00fz commented 5 years ago

GitSync uses a sparse-checkout approach and require quite a custom local setup in order to function. GitSync takes care of all that transparently.

The ability of having a full Grav instance on a repository and being able to point GitSync toits user folder has been requested already before. However, the Grav standard is to only push the user folder on a repository, that's how skeletons in Grav work too.

I do see how it might be a necessity for some to have the entire Grav instance on a repository and how this is not really compatible with GitSync at this moment but it's not something that I plan on implementing anytime soon.