【发布时间】:2013-06-27 15:03:52
【问题描述】:
第三次更新
更多信息:
-
git-bash shell 中的命令按预期工作
在 git-bash shell 中,调用 Git\bin\git.exe
Git\bin 是 sh.exe 所在的位置
在 PowerShel(或 cmd,或 tcc)中,调用 Git\cmd\git.exe
即使在将 Git\bin 添加到 PATH 之后(在 Git\cmd 之后),脚本也不起作用
非常沮丧...
第二次更新
.exe 文件实现的所有 git 命令似乎都可以工作:git-fetch.exe、git-merge.exe、git-push.exe 等。
似乎所有作为脚本实现的命令不工作:
Git\libexec\git-core\git-pull
Git\libexec\git-core\git-rebase
等等。因此,无论 git.exe 调用什么来运行 libexec\git-core 脚本似乎都被 farkled...
第一次更新
我们又来了……“git pull”已经跑偏了(很确定它昨天还在工作):
I:\Work\bitbucket\PluralSight\proj1 [work2]> git stat
On branch work2 nothing to commit, working directory clean
I:\Work\bitbucket\PluralSight\proj1 [work2]> git fetch
Password for 'https://user@bitbucket.org':
I:\Work\bitbucket\PluralSight\proj1 [work2]> git pull
*fatal: 'pull' appears to be a git command, but we
were not able to execute it. Maybe git-pull is broken?*
I:\Work\bitbucket\PluralSight\proj1 [work2]>
我已经卸载/重新安装了 msysgit。我在 PowerShell 和 cmd.exe 中得到相同的结果。
原帖
[work]> git rebase master
fatal: 'rebase' appears to be a git
command, but we were not able to execute it.
Maybe git-rebase is broken?
刚刚在 Win7x64 上重新安装了 mSysGit。 PATH 现在包括:
C:\Program Files (x86)\Git\cmd
C:\Program Files (x86)\Git\bin
对出了什么问题有任何想法吗?我在 GitHub 上搜索,但没有找到任何信息...
【问题讨论】:
-
您在那里使用哪个命令外壳?电源外壳?我怀疑你的系统上可能有另一个 sh.exe,它正在被使用,而不是 Git for Windows 附带的那个。如果是这样,请尝试删除 Git\bin 的路径,然后使用 Git\cmd。 Git\cmd\git.exe 包装器设置环境,以便 git 程序首先找到 git 附带的实用程序。
-
感谢您的回复。但是,Git\cmd 位于 Git\bin 之前。无论如何我都会尝试删除 Git\bin。
-
git.exe 是外部的:C:\Program Files (x86)\Git\cmd\git.exe。 PowerShell 和 cmd.exe(和 tcc.exe)的结果相同。