Skip to content

Instantly share code, notes, and snippets.

@Vbitz
Last active August 29, 2015 14:13
Show Gist options
  • Save Vbitz/5d698e8364800aa43c31 to your computer and use it in GitHub Desktop.
Save Vbitz/5d698e8364800aa43c31 to your computer and use it in GitHub Desktop.
Python script to commit git changes every 15 minutes
#!/usr/bin/env python2.7
import time
import subprocess
if __name__ == '__main__':
while True:
for i in range(0, 15):
print "Commiting in %s minutes" % (str(15 - i))
time.sleep(60)
print "Commiting Progress"
commitMessasge = "Process at: %s" % (time.strftime("%c"))
subprocess.Popen(["git", "commit", "-a", "-m", commitMessasge]).wait()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment