我的git repo中有一些基本的python脚本。 首先,我在repo中测试一些git命令:
$ git ls-remote --heads origin master
a5dd03655381fcxxxx4e759ceba7aeb6456 refs/heads/master
现在我想在Python中执行相同的命令:
^{pr2}$输出为:
git: 'ls-remote --heads origin master' is not a git command. See 'git --help'.
OK
我错过了什么?
当我在python脚本中执行ls-remote
时,它可以工作:
a5dd03655381fcxxxx4e759ceba7aeb6456 HEAD
a5dd03655381fcxxxx4e759ceba7aeb6456 refs/heads/master
(我知道if语句是“错误的/无用的”)。在
您需要将每个参数放在列表中的单独项中。在
相关问题 更多 >
编程相关推荐