我们正在尝试编写一个脚本,该脚本将基于提交历史发布文章。我们运行了下面的命令,而不是进行提交,它实际上把我们拖到了python终端;终端在尝试创建git时意外运行命令
cchilders:~/blogplish (master)
$ git commit -m "You can run this file using the `python` command in your terminal:\n```$ python blogplish.py\nThe script is working.```"
Python 2.7.12 (default, Jul 1 2016, 15:12:24)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
我们很好奇它为什么这样做,上述命令中的两个蟒蛇中的哪一个导致了这个问题。另外,当我们提交这样的提交时,我们如何能够阻止这一点。我们的脚本将生成的目标语言是降价。 谢谢!
“通常使用更好......”假设有意使用扩展。 –
@ Code-Apprentice:呃,是的。 :-) – torek
这是迄今为止最好的答案,因为它解释了为什么OP会看到有问题的行为。唯一的小缺点是你没有明确规定解决方案。 –