gpt4 book ai didi

git - 库不会通过 git 子树添加到 git

转载 作者:行者123 更新时间:2023-12-04 11:26:02 30 4
gpt4 key购买 nike

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

  • git --exec-path不会打印 git install 目录的正确路径,然后将 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”在那里,为什么会 pop 错误。

    最佳答案

    看来 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
    在我们等待修复时,这为我解决了问题。有一个 issue on Git for Window's GitHub对于 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`.
    如果你不介意,请接受这个作为答案。

    关于git - 库不会通过 git 子树添加到 git,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67990094/

    30 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com