我正在尝试对Google Colab上的Torch使用自定义的安装脚本。
我遇到了与此代码的问题:
#!/usr/bin/env bash
git fetch
git reset --hard
# Submodule update is done inside install.sh
/root/torch/install.sh -s
Colab将其报告给git命令:
致命:不是git存储库(或任何父目录):.git
fatal: not a git repository (or any of the parent directories): .git
表示您尝试运行Git命令,但不在Git存储库中。
第一条命令git fetch
将从一个或多个其他存储库中获取分支和/或标签,因此该脚本应放在git存储库中。
确保您在git repo中,执行agit status
或git remote -v
检查您是否在repo文件夹中。
您可以使用在Colab调用shell命令!
或%%shell
在你的细胞:!pwd
或!git status
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句