Git问题汇总
錯誤代碼
git ------ fatal: No configured push destination. Either specify the URL from the command-line or co
$ git push fatal: No configured push destination. Either specify the URL from the command-line or configure a remote repository usinggit remote add <name> <url>and then push using the remote namegit push <name>解決辦法
需要重新提交
git remote add origin '遠程倉庫名字' git push -u origin 對應遠程分支名例如:我的遠程倉庫名字為'https://github.com/Jichao-Zhao/8_Python'(注意http和https區別)
對應遠程分支名為master
之后,再次提交時只需要 git push即可
其他指令
git add -all git add . git commit -m "提交信息" git push錯誤代碼
fatal: remote origin already exists
解決辦法
這是由于git重復添加遠程倉庫導致,可以先刪除再添加即可。
刪除指令:
git remote rm origin添加指令:
git remote add origin '遠程倉庫名字'錯誤代碼
Failed to connect to proxy.server.com port 8080: Operation timed out
解決辦法
這是由于代理連接錯誤導致,可以重設代理解決。
查看是否使用代理:
git config --global http.proxy或使用另外指令:
git config --global --list取消此代理:
git config --config --unset http.proxy重設代理:
git config --global http.proxy http://127.0.0.1:8080總結
- 上一篇: 《深度学习的数学》二刷总结
- 下一篇: Android Studio错误代码汇总