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

Auto sync option #11

Closed bleutzinn closed 7 years ago

bleutzinn commented 7 years ago

Correct me if I'm wrong or when I'm not using the correct git terms, but the 2-way sync now uses two different methods to start a sync.

On the remote repository side any file change triggers a pull on the Grav side. So any change remotely is automatically synced and anyone visiting the Grav site after that moment sees the changes.

Now on the Grav side changes to files in the user folder, usually in page content, do not trigger a push to the remote repository. Only when changes are made in the Admin plugin and the user hits the Save button the plugin pushes the changed files to the remote repository.

Isn't a save on the Grav side in fact the same as a save on the remote side?

In that respect, an automatic sync on a file level within Grav does makes sense wouldn't it? Also any changes to files in the user folder for example by plugins changing or updating content or pulling in external content would be synced automatically.

w00fz commented 7 years ago

See #10, you can automate synchronization via the CLI command bin/plugin git-sync sync.