pedroborges / kirby-autogit

⬢ Saves every change made via Kirby Panel to a Git repository
149 stars 23 forks source link

User history doesn't get committed to git, resulting in pull issues #31

Closed fitzage closed 6 years ago

fitzage commented 6 years ago

When making changes in the panel on my publishing server, the user profile file gets updated with the history of what pages the user is editing. Autogit doesn't commit these changes, so when I later update that branch from master because of other changes, autogit can't pull because it would overwrite the user file.

pedroborges commented 6 years ago

From what I can see on the Panel source code, $user->update() is called to save the user history so it should trigger the panel.user.update hook. So yes, it can be added.

If you want to submit a PR I'd be glad to merge it in.

I often don't commit the site/accounts folder, so I just add it to .gitignore.

fitzage commented 6 years ago

OK, done. Hope that all looks right. I haven't actually tested it, so I'm about to do that and I'll let you know.

fitzage commented 6 years ago

So as I'm going to test this, I see that the kirby starterkit now says you should have accounts in gitignore for security reasons, which I guess I understand. So maybe we should skip this and I'll just remove them from my git repo and go about it differently.

fitzage commented 6 years ago

And apparently it doesn't actually work anyway. Oh well.