1. 程式人生 > >git:fatal: Not a git repository (or any of the parent directories): .git

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

在新增遠端庫的時候,我輸入:

$ git remote add origin [email protected].com:yourgithubaccount/project.git

結果報錯了:

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

當前的目錄不是一個git倉庫
解決的辦法有兩種:
1.初始化一個本地倉庫 git init
2.進入到本地倉庫目錄 windows用cd path