1、hint: You've added another git repository inside your current repository.
大概意思:在當前的倉庫中還包含有另一個.git倉庫而且不知道這兩個倉庫的嵌套關系。
解決方法:git rm --caches phto
2、 ! [rejected] master -> master (fetch first)
大概意思:因為github上的遠程庫與本地庫版本不一致
解決方法:
一、先拉一遍再上傳
1、更新 git fetch origin master
2、比較本地的倉庫和遠程參考的區別
$ git log -p master.. origin/master
3、把遠程下載下來的代碼合並到本地倉庫,遠程的和本地的合並
$ git merge origin/master
二、暴力覆蓋,直接將遠程倉庫里的文件覆蓋掉
$ git push -f origin master
3、fatal: remote origin already exists.
解決方法:
1、先移除 git remote rm origin
2、再添加 git remote add origin https://github.com/......
4、[git]warning: LF will be replaced by CRLF in
大概意思:需要提交的文件是在windows下生成的,windows中的換行符為 CRLF, 而在linux下的換行符為LF,所以在執行add . 時出現提示
解決方法:
1、git config --global core.autocrlf false
2、再執行一遍git 提交
