fatal: No configured push destination
生活随笔
收集整理的這篇文章主要介紹了
fatal: No configured push destination
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
異常描述
$ 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下載代碼后進(jìn)行了修改,在推送至遠(yuǎn)程倉庫時缺少目標(biāo)倉庫地址
解決方案
1. 本地客戶端遠(yuǎn)程連接目標(biāo)倉庫
git remote add origin https://github.com/**/*.get2. 推送本地代碼至遠(yuǎn)程倉庫分支
git push -u origin master注意:
以上操作是在本地已經(jīng)執(zhí)行add及commit命令并將代碼納入本地倉庫管理的前提下操作。如果本地代碼未提交至本地倉庫管理則需要先執(zhí)行以下操作
-- 添加文件至緩存區(qū) git add ./project-- 提交代碼至本地倉庫 git commit -m '本次提交代碼注釋'總結(jié)
以上是生活随笔為你收集整理的fatal: No configured push destination的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ssm 框架配置详解
- 下一篇: Java 获取文件路径