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

在提交代碼運行git push命令行的時候出現fatal: Not a git repository (or any of the parent directories): .git錯誤,是由於沒有和遠程git進行連接造成的。

第一步:關聯遠程git
git remote add origin 遠程git路徑
第二步:提交代碼到master上
git push -u origin master
有時候可能如果在本地新建分支(git branch 分支名)的時候出現這種問題,則git初始化一個新的本地庫
git init
發佈了112 篇原創文章 · 獲贊 123 · 訪問量 43萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章