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

在Android Studio導入公司項目的時候出現的問題
這是個git管理的項目,在管理項目的準備工作裏:

ssh-keygen -t rsa -C name@email.com

1.先生成本地公鑰,然後打開公鑰文件複製內容,如果有直接打開公鑰文件

git config --global user.name "name"
git config --global user.email "email"

2.設置git用戶名/郵箱

這個時候我以爲我配置好了,然後執行

git status

結果報了這個錯誤:fatal: Not a git repository (or any of the parent directories): .git
這個時候其實就是根目錄下沒有.git文件夾

git init

後再查看代碼狀態發現就沒有問題了

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章