How do I push code to github on shutdown?

Posted by Ezequiel on Ask Ubuntu See other posts from Ask Ubuntu or by Ezequiel
Published on 2012-09-13T14:57:42Z Indexed on 2012/09/13 15:51 UTC
Read the original article Hit count: 264

Filed under:
|
|
|

I switch between working at home and the office, and sometimes, like today, I forget to run a git commit/push. (I find it easy to ignore the command line since I'm still kind of a beginner, there.)

How can I make it so that when I shut down my Ubuntu OS, it will follow this process:

  1. Check my local code against the github server, executing the rest of this script only if I've made newer changes.

  2. Add all new files.

  3. Make commits with a basic default comment.

  4. Push all changed code to origin master.

If anyone knows how to do this, it would be a major assist. Also, anyone know how to do it for Mac OSX? :D

© Ask Ubuntu or respective owner

Related posts about shutdown

Related posts about git