git远程库与本地联系报错fatal: Not a git repository (or any of the parent directories): .git

在github上新建了一个仓库,然后相与本地的仓库联系起来

$ git remote add origin https://github.com/liona329/learngit.git

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

总是报这个错

解决方法:git init

成功

posted @ 2018-02-28 17:18  李清欣  阅读(3409)  评论(0编辑  收藏  举报