第1個問題:
Reinitialized existing Git repository in xxx/xx/xxx/xx
這是因爲你隱藏了.git 文件。
所以看起來沒有了.git 文件。
解決方法:
https://blog.csdn.net/heshuaicsdn/article/details/81482281
第2個問題:
$ git remote add origin [email protected]:chenjiaze/test001.git
fatal: remote origin already exists.
如果在使用命令git remote add
時報錯:
git remote add origin [email protected]:liaoxuefeng/learngit.git
fatal: remote origin already exists.
這說明本地庫已經關聯了一個名叫origin
的遠程庫,此時,可以先用git remote -v
查看遠程庫信息:
git remote -v
origin [email protected]:michaelliao/learngit.git (fetch)
origin [email protected]:michaelliao/learngit.git (push)
可以看到,本地庫已經關聯了origin
的遠程庫,並且,該遠程庫指向GitHub。
我們可以刪除已有的GitHub遠程庫:
git remote rm origin
再關聯碼雲的遠程庫(注意路徑中需要填寫正確的用戶名):
git remote add origin [email protected]:liaoxuefeng/learngit.git
此時,我們再查看遠程庫信息:
git remote -v
origin [email protected]:liaoxuefeng/learngit.git (fetch)
origin [email protected]:liaoxuefeng/learngit.git (push)
第3個問題:
git 提示fatal: remote origin already exists 解決辦法
https://blog.csdn.net/zh_ang_lei/article/details/52473496
https://blog.csdn.net/jingtingfengguo/article/details/51892864
https://www.cnblogs.com/leaf930814/p/6664706.html
第4個問題: 很重要的問題
解決提交到github報錯Please tell me who you are.和爲不同的項目設置不同的名稱
解決方法:
https://blog.csdn.net/coco_wonderful/article/details/51822143
第5個問題:fatal: Could not read from remote repository.的解決辦法
解決方法:需要重新配置公鑰的意思
https://blog.csdn.net/Leolu007/article/details/79129446
https://baijiahao.baidu.com/s?id=1606669351803311743&wfr=spider&for=pc
第6個問題:git提交報錯nothing added to commit but untracked files present
解決方法:
https://www.jianshu.com/p/4d642a42414a
第7個問題:
提交文件夾的作用:git add .
接下來在執行其他的命令
git commit -m "註釋" -- 把本機緩存中的內容提交到本機的 HEAD 裏面
git push origin master -- 把本地的 commit push 到遠程倉庫中
https://blog.csdn.net/zhandoushi1982/article/details/8464548
(1)git add:添加至暫存區,但並未提交至服務器。git add . 是表示把當前目錄下的所有更新添加至暫存區。有時在終端操作這個會提示:
第8個問題:
第一個先解決這個
https://jingyan.baidu.com/article/36d6ed1fb320531bcf4883e6.html
https://blog.csdn.net/zxsted/article/details/17022665
第二解決方法
https://blog.csdn.net/sinat_38295832/article/details/81221032
最終的解決方法
https://blog.csdn.net/Lc_style/article/details/80897608
第9個問題:
解決方法
https://blog.csdn.net/wd2014610/article/details/80854807
https://segmentfault.com/q/1010000002664985