【问题标题】:"git config --edit --global" says - command not found“git config --edit --global”说-找不到命令
【发布时间】:2022-01-11 18:26:22
【问题描述】:

我一直在尝试通过上述命令行访问 Eclipse IDE(在分别使用 git config --global user.namegit config --global user.email 设置我的用户名和电子邮件之后),每次我这样做时,它都会在命令行上显示以下内容:

.

我尝试过通过环境变量进行更改,但还是不行。

【问题讨论】:

标签: git command-line git-bash


【解决方案1】:

这不是 git 本身的问题。图片第一行的问题 git config --global core.editor "code --wait --new-window"

它会更改您的默认编辑器,但无法访问 code。验证您是否安装了 Visual Studio 代码,或将编辑器更改为其他内容。老实说,你不应该需要这么繁重的编辑器来编辑你的 gitconfig。

如果您确定已安装 VSC,请检查您的 PATH 变量 echo $PATH 查找 VSC 的路径是否存在。

【讨论】:

  • 我不想使用visual studio代码,我想使用eclipse,当我安装git时,我指定我想要eclipse ide,但它仍然给我这些问题。
  • @ekeneuzodinma 正如这个答案所指出的,您已经更改您的配置以要求使用程序“代码”(即 Visual Studio Code)。这就是屏​​幕截图中的第一行所做的。如果你不知道它在做什么,那么感谢它没有变得更糟,并且更小心地运行你不理解的命令。
  • 您可以运行另一个git config --global core.editor "<insert your desired editor here, not including the angle brackets>" 来替换code --wait --new-window 设置。
猜你喜欢
  • 1970-01-01
  • 2023-03-10
  • 1970-01-01
  • 2022-10-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多