Colab上的Git使用问题

用户名

我正在尝试对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 statusgit remote -v检查您是否在repo文件夹中。

您可以使用在Colab调用shell命令!%%shell在你的细胞:!pwd!git status

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章