I think you need to add a check if there really is a Git repo in the content folder, before the plugin gets activated.
In my case, I want Autogit to be activated only on the live server, not on my local development installation. On my local installation, I have my main Git repo in the root folder that tracks the website, but the content folder is excluded since the client manages the content themselves on the live server.
I tried this plugin as a way to get a version history of the content folder on the live server. This can be useful if the client accidentally deletes a page or some content. If that happens, I can recreate the content from the Git repo.
Since I don't have a .git repo in my local content folder, all commands that the plugin executes, affects my main Git repo in the root folder. This is not good.
One particularly issue, is this: Say I'm working in a different branch than master. As soon as Autogit gets initialized, for example if I refresh a page in the panel or the frontend, Autogit automatically checks out the master branch on my main Git repo.
I haven't found a way to deactivate Autogit through a config setting, but a better way would be if Autogit would check for a Git repo in the content folder before it gets activated. If no Git repo is found in the content folder, then Autogot should not be activated, or maybe just show a message in the widget that a Git repo is missing.
I think you need to add a check if there really is a Git repo in the content folder, before the plugin gets activated.
In my case, I want Autogit to be activated only on the live server, not on my local development installation. On my local installation, I have my main Git repo in the root folder that tracks the website, but the content folder is excluded since the client manages the content themselves on the live server.
I tried this plugin as a way to get a version history of the content folder on the live server. This can be useful if the client accidentally deletes a page or some content. If that happens, I can recreate the content from the Git repo.
Since I don't have a .git repo in my local content folder, all commands that the plugin executes, affects my main Git repo in the root folder. This is not good.
One particularly issue, is this: Say I'm working in a different branch than master. As soon as Autogit gets initialized, for example if I refresh a page in the panel or the frontend, Autogit automatically checks out the master branch on my main Git repo.
I haven't found a way to deactivate Autogit through a config setting, but a better way would be if Autogit would check for a Git repo in the content folder before it gets activated. If no Git repo is found in the content folder, then Autogot should not be activated, or maybe just show a message in the widget that a Git repo is missing.