It seems to me this is more of a "git" problem. Searching "automatically commit to github" I find that
there are multiple solutions to this kind of problem. The one at the top of the list for instance was "gitwatch".
It looks pretty interesting.
Maybe you could also synchronize your git directory using GoogleDrive or DropBox. Then it would be available everywhere.
You would only need to push to github when you needed github itself to have the latest updates.
Good luck