我在Python中使用此代码(使用"import git"):
repo = git.Repo("my_repository")
repo.git.add("bla.txt")
repo.git.commit("my commit description")
Run Code Online (Sandbox Code Playgroud)
现在我想推动这个提交.我已经尝试了很多但没有成功.Python命令应该与此Bash命令类似:
git push origin HEAD:refs/for/master
Run Code Online (Sandbox Code Playgroud)