我正在关注 this tutorial .一切正常,直到我在我的本地机器上运行它(在用它们的实际值替换 $VARIABLE
之后):
git remote add nfsn ssh://$USERNAME@$SERVER/home/private/git/$REPONAME.git
我收到以下错误消息:
fatal: Not a git repository (or any of the parent directories): .git
我如何通过这一步?
最佳答案
您是否初始化了本地 Git 存储库,应该将此远程添加到其中?
你的本地目录有.git
文件夹吗?
试试 git init
。
关于git - 尝试远程添加 Git 存储库时收到 "fatal: Not a git repository",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4630704/