What do you want to see in the next Auto Git plugin?

I started working on the Auto Git plugin about 8 months ago and I’m overwhelmed that so many people are using it today. That’s a great encouragement to me!

As you might have noticed I haven’t been able to do more work on it in a long time. That’s about to change. I started freelancing part time this month and between projects I want to take Auto Git to the next level.

What does it do so far?

If you don’t know Auto Git yet, its a Kirby plugin that creates a Git commit every time a content is changed via Kirby’s panel. But it goes beyond by offering:

  • Support to any Kirby folder structure
  • Webhook URLs for pull and push events
  • Panel widget for pushing/pulling manually
  • Localized commit messages
  • The use of panel user as commit author
  • It’s own triggers for pull and push events

What’s next?

So far I have planned to add a visual log history page where you can see, undo and revert changes right from the panel.

Getting started with Git isn’t so simple. Since environments vary a lot, many people have been having issues moving their projects to Git so they can use Kirby + Auto Git. For that reason I also want to add a way to check the environment to see if all the requirements are fulfilled and provide better feedback on how to solve issues. For example:

  • Does the web server user have access to the .git folder and ~/.ssh?
  • Is there a remote repo properly setup?
  • Has the public ssh key been added to the repo on Github/Gitlab/Bitbucket?

… and other things like these that are hard to debug when you are just getting started.

Along with that I plan to add a wiki with in detail installation guide and a how-to section covering the most common issues.

What do you want to see in Auto Git?

I want to know how you are using Git on your Kirby projects and how I can make the next Auto Git version fulfil your use case and as many others as possible.

It’s your turn!


I’ve made good progress on the next version of Auto Git in the past week. It’s going to be a major rewrite with new features added and some issues addressed. Existing users will be able to upgrade easily. Take a peek at what I’ve got so far:

Since Auto Git will now have a dedicated dashboard (besides the panel widget) I’m putting a lot of thinking into abstracting Git away to only use terms known to non-technical users. That’s why I choose update/backup instead of pull/push.

I’m also thinking about renaming the plugin and would appreciate your feedback. What about Content Snapshots? Any other suggestion?

Features planned

  • Display paginated log history on the dashboard :white_check_mark:
  • Full localisation (UI and commit messages) :white_check_mark:
  • Push/pull from remote repository :white_check_mark:
  • Undo last commit :white_check_mark:
  • Revert any commit :white_check_mark:
  • See commit details (listing changed files and fields)
  • See commit diff

The new localisation system uses JSON files and is much more flexible, allowing you to use any page/file attribute you want to:

// ../en.json
  "autogit.commit.site.update": "Changed site options",
  "autogit.commit.page.create": "Created page {uri}",
  "autogit.commit.page.delete": "Deleted page {uri}",
  "autogit.commit.page.hide": "Set page {uri} status to invisible",
  "autogit.commit.page.move": "Moved page {old.uri} to {uri}",
  "autogit.commit.page.show": "Set page {uri} status to visible",
  "autogit.commit.page.sort": "Sorted page {uri}",
  "autogit.commit.page.update": "Updated page {uri}",
  "autogit.commit.file.upload": "Uploaded file {filename}",
  "autogit.commit.file.replace": "Replaced file {filename}",
  "autogit.commit.file.rename": "Renamed file from {old.filename} to {filename}",
  "autogit.commit.file.update": "Updated file {filename}",
  "autogit.commit.file.sort": "Sorted file {filename}",
  "autogit.commit.file.delete": "Deleted file {filename}"

You’ll be able to change one or many strings just by using Kirby’s Language class:

<?php // site/config/config.php

l::set('autogit.commit.page.create', 'Created page {title}');

This is going to be pretty great :slight_smile:. Looking forward to using your plugin in a next project.

1 Like

You are an inspiration to me @texnixe! Before your Logger plugin I didn’t know it was possible to add custom pages to the panel. Thank you!

I can’t wait to use this! Exactly what I want/need. Since you’re thinking through renaming it I’ll just throw out some name ideas:

(For naming i tend to like simple names…)

  • Snapshots
  • GitKit
  • Versions
  • Git Content

Personally, I like “Git” in the name since it’s tied to git and I think devs will search on that.

[Update] Btw, I think being able to diff content will be fantastic. I can’t wait to see that feature!

1 Like

Wow - this is incredible. I will be implementing this for http://radio.garden as soon as I get the chance. I am allowing in external editors, so it would be incredibly handy to have a change log.

Wondering though: what happens when content is edited outside of the panel? Is it then committed on next panel save? Or does only the data changed by the panel get committed?

Auto Git uses Kirby hooks to detect changes:

kirby()->set('hook', 'panel.page.create', function ($page) {
    autogit()->save('page.create', $page);

The save method runs git add -all content/ followed by a git commit -m 'Message goes here'. So yes, it would get committed on the next change done via the panel.

Other plugins could call the save method as well. Maybe I can make that even easier and more customisable. What’s your case @jonathan.puckey?

I am using Kirby to take care of a directory of thousands of radio streams.

I am running a daily node.js based cron job that:

  • pulls down all the content files from the kirby installation
  • checks the status of each stream to see if it is running or not.
  • Updates a running history (array of true / false values) on every radio stream content file
  • uploads the changed files to the kirby installation

The next editor to push ‘save’ would then be committing all those changes.

If Auto Git does a pull from the repository each time, I guess I could commit / push my automatic stream checking content changes through my cron-job too?

I was also wondering if it wouldn’t make sense to commit the uri of the changed page instead of the entire content directory?

If you are updating the content using a panel Page object it will trigger the hook and Auto Git will get called.

// instead of page() use panel()->page();

    'isStreaming' => true

// triggers panel.page.update hook

As I said, you will be able to call Auto Git methods directly to add folders and create commits with custom messages. How about that?

Auto Git won’t push/pull unless you tell it to do so. Pushing/pull on every change would slow down considerably any interaction done on the panel.

You can setup a webhook so that Auto Git pulls every time the remote repository receives a push. A cron job on the server is the setup I recommend for pushing regularly to the remote repository.

This would be ideal, but wouldn’t work well when sorting, renaming and changing the visibility status of a page. I had tried that!

  • Sorting also changes sibling pages
  • Renaming and changing the visibility status changes the folder name

It’s tricky and risky and I don’t wanna mess other people’s content :wink: Maybe I can find a better solution to this later on.

Thanks for all the information – super valuable! I am going to install Auto Git and will report back soon.

Great, go ahead and try it out. The current version works great and the next will include many cool new features!

The next release of Auto Git is getting closer! Just wanted to share what I’ve got so far:

New Dashboard

New Widget

Commit details (list of changed files)

Commit details (list of changed fields)

Revert commit confirmation

I haven’t decided on the new name yet but as you can see I’ve been playing with some ideas…

Feel free to ask question and give feedback!


We just started using Auto Git for radio.garden and it is working like a charm. Thank you!