I have this code in Python (using "import git"):
repo = git.Repo("my_repository")
repo.git.add("bla.txt")
repo.git.commit("my commit description")
Now I want to push this commit. I've tried a lot with no success. The Python command should be similar to this Bash command:
git push origin HEAD:refs/for/master
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…