程序文件 (x86) 的 git 命令

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20515893/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 09:26:47  来源:igfitidea点击:

git command for Program FIles (x86)

git

提问by Code Lover

How to write command in git bash for Program Files (x86)? It is giving me error below

如何在 git bash 中编写命令Program Files (x86)?它在下面给我错误

user@PC /C
$ ./git-credential-winstore -i C:\Program Files (x86)\Git\bin\
sh.exe": syntax error near unexpected token `('

Can anyone tell me how to write the path for this?

谁能告诉我如何为此编写路径?

采纳答案by Code Lover

Here is the answer

这是答案

The path should be in this format

路径应该是这种格式

./git-credential-winstore -i /c/Program\ Files\ \(x86\)/Git/bin

Also add to git.exeat the end so final path will become

也添加到git.exe最后所以最终路径将成为

./git-credential-winstore -i /c/Program\ Files\ \(x86\)/Git/bin/git.exe

回答by deadlydog

I was getting a similar error when trying to push or pull my git branch with GitExtensions installed and found this postwhich describes how fix the problem. The solution was to go to my .gitconfig file at C:\Users\[user name]\.gitconfigand change the line:

当我尝试在安装了 GitExtensions 的情况下推送或拉取我的 git 分支时遇到类似的错误,并发现这篇文章描述了如何解决问题。解决方案是转到我的 .gitconfig 文件C:\Users\[user name]\.gitconfig并更改该行:

helper = !\\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\\"

to:

到:

helper = !\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\"

I know my problem was a bit different than the OP's problem, but the error message is the same so I thought I would post my answer here for others who find this post with my problem.

我知道我的问题与 OP 的问题有点不同,但错误消息是相同的,所以我想我会在这里发布我的答案,供其他人发现这篇文章与我的问题有关。

回答by V P

user@PC /C
$ ./git-credential-winstore -i C:/Program\ Files\ \(x86\)\Git\bin\