接收“致命:不是git存储库”当试图远程添加一个Git仓库时 [英] Receiving "fatal: Not a git repository" when attempting to remote add a Git repo

查看:83
本文介绍了接收“致命:不是git存储库”当试图远程添加一个Git仓库时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





  git remote add nfsn ssh: //USERNAME@NFSNSERVER/home/private/git/REPONAME.git 

(更换USERNAME后,NFSNSERVER ,并使用正确的名称REPOAME)我收到错误:

 致命:不是git存储库(或任何父目录):.git 

你能帮我克服这一步吗?

您的本地目录是否有 .git 文件夹?



尝试 git init


I am introducing myself to Git by following this tutorial:

Everything works fine up until the part where the repo is added to my local machine:

git remote add nfsn ssh://USERNAME@NFSNSERVER/home/private/git/REPONAME.git

(After replacing USERNAME, NFSNSERVER, and REPOAME with the correct names) I receive the error:

fatal: Not a git repository (or any of the parent directories): .git

Can you help me get past this step?

解决方案

Did you init a local Git repository, into which this remote is supposed to be added?

Does your local directory have a .git folder?

Try git init.

这篇关于接收“致命:不是git存储库”当试图远程添加一个Git仓库时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆