make Gitium Heroku/Dokku friendly
First of all, thanks for sharing this excellent plugin.
The reason for this PR is that Gitium, as it is now, is not Heroku/Dokku friendly for the following reasons:
-
It assumes that only wp-contents should be versioned. However herokuish platforms rely on all the code of an app being available at the time you push. In addition, there is no clear advantage on having wp-core separated from wp-contents.
-
It assumes that the remote repo URL won't be available until someone visits the admin panel and writes it down. In a herokuish platform, the remote repo would be defined in a linked database or an environment variable.
-
It doesn't automatically initialize and connect to the remote repository, relying on a person to visit the admin page and following the step-by-step setup procedure. In herokuish platforms, you would expect your app to be fully working after doing "git push".
-
It automatically regenerates the SSH keys and webhooks when you manually disconnect from the repo. This is not strictly a problem with herokuish platforms, but looks unnecessary and a bit annoying.