How can I automatically (maybe using a cronjob?) push code from my FTP server (only a wordpress plugin, not the entire project) to GitHub, using PHP?
I know that you'd usually have a local environment, and then push that to GitHub and then pull from GitHub to FTP, but in this scenario, I want to change the files directly on FTP, and then every hour or half day, push to GitHub automatically. Is this even possible? It needs to commit, push and merge automatically.
We want to use this so we have the possibility to go back and look at earlier versions of the file. We've looked into GitHub API, but we can't seem to find what we need. I hope the question makes sense.