简体   繁体   English

git 提交不适用于“未找到 python ...”警告

[英]git commit is not working with "python was not found..." warning

I am trying to commit a couple of files using git bash on windows 10 .我正在尝试使用windows 10上的 git bash 提交几个文件。 After doing git add , the file get staged and appear in green.执行git add后,文件被暂存并显示为绿色。 Next when I run git commit , there is below message and nothing happens接下来,当我运行git commit时,出现以下消息并且没有任何反应

"Python was not found but can be installed from the Microsoft Store: ms-windows-store://pdp/?productid=9NJ46SX7X90P" “未找到 Python,但可以从 Microsoft Store 安装:ms-windows-store://pdp/?productid=9NJ46SX7X90P”

I checked the python version by running python --version is git bash and it displays Python 2.7.2 I checked the python version by running python --version is git bash and it displays Python 2.7.2

Can someone please help me fix the issue with git commit?有人可以帮我解决 git 提交的问题吗?

You can figure out if it is caused by a git hook using the following command:您可以使用以下命令确定它是否是由 git 挂钩引起的:

strace git commit | grep access

If the reason for the error is a git hook, in the output, you'll be able to see that last accessed file like .git/hooks/pre-commit .如果错误的原因是 git 挂钩,在 output 中,您将能够看到最后访问的文件,如.git/hooks/pre-commit

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM