简体   繁体   English

Windows 8 Powershell无法识别'gitk --all'命令

[英]'gitk --all' command not being recognized in Windows 8 Powershell

gitk is not working for me. gitk对我不起作用。 I get the error saying "the term 'gitk' is not recognized as the name of a cmdlet, function, script file, ...." 我收到一条错误消息:“术语'gitk'未被识别为cmdlet,函数,脚本文件等的名称。”

One interesting thing I noted was that inside C:\\Program Files(x86)\\Git\\bin\\, there was a gitk file, but it had no extension. 我注意到的一件有趣的事情是,在C:\\ Program Files(x86)\\ Git \\ bin \\中,有一个gitk文件,但没有扩展名。 Most other files in that folder had a .exe extension. 该文件夹中的大多数其他文件都有.exe扩展名。

I also made sure that C:\\Program Files(x86)\\Git\\bin\\ is specified in the PATH environment variable. 我还确保在PATH环境变量中指定了C:\\ Program Files(x86)\\ Git \\ bin \\。

Also, I tried adding C:\\Program Files(x86)\\Git\\cmd\\ to PATH because it contains a gitk.cmd file, but that did not help either. 另外,我尝试将C:\\ Program Files(x86)\\ Git \\ cmd \\添加到PATH,因为它包含gitk.cmd文件,但这也无济于事。

Edit : I was using Powershell earlier, since I have poshgit installed. 编辑:因为我已经安装了poshgit,所以我之前使用的是Powershell。 I switched over to bash, and I was able to do gitk --all from there. 我切换到bash,然后就可以执行gitk了。

I just got it to work after having the same problem. 遇到相同的问题后,我才开始工作。

At the PowerShell prompt it typed: "Bash" and hit return. 在PowerShell提示符下,键入:“ Bash”,然后按回车键。 This put me into a bash shell. 这使我陷入了重击。 Then I typed "gitk" at the Bash prompt and it worked. 然后,我在Bash提示符下键入“ gitk”,它起作用了。

So that gitk file is a UNIX shell script and requires the shell to work. 因此,该gitk文件是UNIX shell脚本,需要该shell才能工作。

I suppose you could always have one of your Power Shell window in Bash mode and then this tool is available. 我想您始终可以在Bash模式下拥有一个Power Shell窗口,然后此工具可用。

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

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