该库没有通过 git 子树添加到 git

Ден*_*мов 5 git git-subtree

我通过 git 子树将 GLFV 库添加到项目中,但出现此警告“看起来您的 git 安装或您的 git-subtree 安装已损坏”。还描述了造成这种情况的几个原因:

  • 如果 git --exec-path没有打印 git 安装目录的正确路径,请将 GIT_EXEC_PATH 环境变量设置为正确的目录。

  • 确保您的git-core \ git-subtree文件位于 PATH 或 git exec 路径 ( C: / Program Files / Git / mingw64 / libexec / git-core) 中。

  • 您应该将 git-subtree 作为 运行git core \ git-subtree,而不是作为git-core \ git-subtree

我检查了库的链接是否正确,文件“git-subtree”在那里,为什么会弹出错误。

小智 5

Windows 版 Git 的 git 子树安装似乎已损坏。

我可以从以下位置下载旧版本: https: //github.com/git-for-windows/git/releases/download/v2.31.0.windows.1/Git-2.31.0-64-bit.exe

在我们等待修复期间,这为我解决了这个问题。Windows 的 GitHub 上的 Git 上存在git 子树错误的问题。

我收到以下错误:

看起来您的 git 安装或 git-subtree 安装已损坏。

It looks like either your git installation or your git-subtree installation is broken.

Tips:
 - If `git --exec-path` does not print the correct path to
   your git install directory, then set the GIT_EXEC_PATH
   environment variable to the correct directory.
 - Make sure that your `git-core\git-subtree` file is either in your
   PATH or in your git exec path (`C:/Program Files/Git/mingw64/libexec/git-core`).
 - You should run git-subtree as `git core\git-subtree`,
   not as `git-core\git-subtree`.
Run Code Online (Sandbox Code Playgroud)

如果您不介意,请接受此答案。

  • 好消息是,v2.33 几天前发布了,我测试它解决了这个问题。您可以从 https://git-scm.com/download/win 获取它。 (2认同)