【问题标题】:Git Error After Fresh Install全新安装后的 Git 错误
【发布时间】:2011-07-17 00:06:49
【问题描述】:

所以我试图从 HTML5 Boilerplate 运行 createproject.sh script 并遇到错误。我看到了一个似乎相关的问题documented here,据我所知,修复它的最佳方法是升级到最新的 git。所以我从谷歌代码(git-1.7.5.4-x86_64-leopard)中获取了 git 并运行了安装程序。现在,当我尝试运行 shell 脚本时,我遇到了这个错误:

fatal: Not a git repository (or any parent up to mount parent /Users)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

我正在运行一个启用了雪豹和文件库的 Mac(我认为这并不重要,但我想我会提到它)。我已经使用 dmg 中提供的卸载脚本来卸载它并尝试重新安装。我也尝试过使用谷歌代码(i386)提供的其他版本的 git,但无济于事。任何帮助将非常感激!谢谢。

【问题讨论】:

    标签: git terminal html5boilerplate


    【解决方案1】:

    我对“HTML5 Boilerplate”一无所知,但该脚本中的第一个命令似乎是 git rev-parse,它只能在 git repo 中工作。您是在本地 git repo 的目录或子目录中运行此脚本吗?

    具体来说,脚本表明您应该从html5-boilerplate/build 运行它,我假设html5-boilerplate 将是您链接的github 存储库的本地克隆。您从头开始采取的步骤如下:

    cd <projects dir>
    git clone git://github.com/paulirish/html5-boilerplate.git
    cd html5-boilerplate/build
    chmod +x createproject.sh
    ./createproject.sh
    

    【讨论】:

    • 是的,我在从链接仓库下载的 html5-boilerplate/build 中运行它。
    • @Jeff:“下载”还是“克隆”?您的 html5-boilerplate 目录中是否有一个名为“.git”的目录?如果不是,那么它就不是 git repo,并且该脚本将不起作用。
    • 不,没有名为 git 的目录只是一个 .gitignore 文件(我相信我正在展示我的 git 无知:))。那么我需要做什么才能获得回购协议?
    • 现在可以使用了。感谢你的帮助!现在我只需要学习 git 和 bash。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-01-06
    • 1970-01-01
    • 2012-02-18
    • 1970-01-01
    • 2017-11-15
    • 2023-01-06
    • 1970-01-01
    相关资源
    最近更新 更多