[英]python script to print the last commit message from specific git branch
[英]Discovering git branch from python script
我有一个 python 脚本。 我需要在运行时通过 python 访问 git 分支的名称,我从该分支运行 python 脚本。 有没有办法做到这一点?
编辑: os.system("git rev-parse --abbrev-ref HEAD") 输出到 cli,我不知道如何从python 访问它...
我想要像git_branch = <python commands>
这样的东西
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.