itsblue-website/plugins/git-sync
2020-04-22 13:18:29 +00:00
..
app (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
classes (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
cli (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
css-compiled (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
fonts (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
images (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
js (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
scss (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
templates (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
vendor (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
.eslintrc (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
.gitignore (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
blueprints.yaml (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
CHANGELOG.md (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
composer.json (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
composer.lock (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
git-sync.php (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
git-sync.yaml (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
gosass.sh (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
LICENSE (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
package.json (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
README.md (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
watch.sh (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
webpack.conf.js (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
wizard.png (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00
yarn.lock (Grav GitSync) Automatic Commit from dorian 2020-04-22 13:18:29 +00:00

Git Sync is a Plugin for Grav CMS that allows to seamlessly synchronize a Git repository with your Grav site, and vice-versa.

Git Sync captures any change that you make on your site and instantly updates your git repository. In the same way, Git Sync supports webhooks, allowing to automatically synchronize your site if the repository changes.

Thanks to this powerful bi-directional flow, Git Sync can now turn your site into a collaborative environment where the source of truth is always your git repository and unlimited collaborators and sites can share and contribute to the same content.

Videos: Setup and Demo

Up and Running in 2 mins 2-way Sync Demonstration
Up and Running in 2 mins 2-way Sync Demonstration

Installation using the GPM (Grav Package Manager)

To install git-sync simply run this command from the Grav root folder

bin/gpm install git-sync

After having installed the plugin, make sure to go in the plugin settings in order to get the Wizard configuration started.

Features

  • Easy step-by-step Wizard setup will guide you through a detailed process for setting things up
  • Supported hosting services: GitHub, BitBucket, GitLab as well as any self-hosted and git service with webhooks support.
  • Private repositories
  • Synchronize any folder under user (pages, themes, config)
  • 2FA (Two-Factor Authentication) and Access Token support
  • Webhooks support allow for automatic synchronization from the Git Repository with secure Webhook URL auto-generated and support for Webhook Secret (when available)
  • Automatically handles simple merges behind the scenes
  • Easy one-click button to reset your local changes and restores it to the actual state of the git repository
  • Easy one-click button to manually synchronize
  • Support for Admin Quick Tray so you can synchronize from anywhere in Admin
  • Ability to customize whether GitSync should synchronize upon save or just manually
  • Customize the Committer Name, choose between Git User, GitSync Commiter Name, Grav User Name and Grav user Fullname
  • With the built-in Form Process action gitsync, you can trigger the synchronization anytime someone submits a post.
  • Any 3rd party plugin can integrate with Git Sync and trigger the synchronization through the gitsync event.
  • Built-in CLI command to automate synchronizations
  • Log any command performed by GitSync to ensure everything runs smoothly or debug potential issues

Command Line Interface

Git Sync comes with a CLI that allows to run synchronizations right within your terminal. This feature is extremely useful in case you'd like to run an autonomous periodic crontab job to synchronize with your repository.

To execute the command simply run:

bin/plugin git-sync sync

Requirements

In order for the plugin to work, the server needs to run git 1.7.1 and above.

The PHP exec() and escapeshellarg() functions are required to be enabled.

Sponsored by

This plugin could not have been realized without the sponsorship of Hibbitts Design and the development of Trilby Media.