I created a new repository on github.com and then cloned it to my local machine with
git clone https://github.com/usrname/mathematics.git
I
import subprocess p = subprocess.Popen("git rev-parse HEAD".split(), stdout=subprocess.PIPE) out, err = p.communicate() sha = out.strip()
There's probably a way to do this with PyGithub, but this should work for a quick hack.