首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >库不通过git子树添加到git中。

库不通过git子树添加到git中。
EN

Stack Overflow用户
提问于 2021-06-15 16:26:10
回答 1查看 1.2K关注 0票数 5

我通过git子树将GLFV库添加到项目中,但是这个警告“看起来像是您的git安装或您的子树安装失败了”。还说明了以下几个原因:

  • 如果git --exec-path没有为您的git安装目录打印正确的路径,那么将GIT_EXEC_PATH环境变量设置为正确的目录。
  • 确保您的git-core \ git-subtree文件位于路径中或git路径(C: / Program Files / Git / mingw64 / libexec / git-core)中。
  • 您应该以git core \ git-subtree的形式运行git子树,而不是以git-core \ git-subtree的形式运行。

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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-06-16 15:22:30

看来git子树安装是坏的,问题是Git for Windows。

我能够从:https://github.com/git-for-windows/git/releases/download/v2.31.0.windows.1/Git-2.31.0-64-bit.exe下载一个旧版本。

这为我解决了这个问题,而我们正在等待解决办法。有一个用于git子树错误的窗口GitHub中的Git问题

我得到了以下错误:

看起来,您的git安装或git子树安装都失败了。

代码语言:javascript
复制
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`.

如果你不介意的话,请接受这个答案。

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67990094

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档