How do I push new files to GitHub?

后端 未结 6 885
独厮守ぢ
独厮守ぢ 2020-12-08 22:31

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

6条回答
  •  死守一世寂寞
    2020-12-08 23:01

    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.

提交回复
热议问题