GitHub提交项目到仓库fatal: No configured push destination.

原因:没指定提交到哪个远程仓库

解决方法:

在你git add .和commit之后

bash 复制代码
git add .
git commit -m "信息"

git push前输入以命令

bash 复制代码
git branch -M main
git remote add origin git@github.com:xxx(你GitHub的名称)/xxx.git(你仓库的名称)
git push -u origin main

参考:

关于gitee第一次提交出现fatal: No configured push destination. Either specify the URL from the command-line or_either specify the url from the command-line or co-CSDN博客

如何新建Github仓库并将本地文件上传到Github(远程连接)以及Git常用命令总结_github 新建仓库push-CSDN博客

相关推荐
ProgramHan3 小时前
github、gitlab、gitee分别都是什么,为什么不能访问?
gitee·gitlab·github
Maynor在掘金4 小时前
Grok 4.2 重磅来袭!xAI 最新 AI 模型功能全解析(2026 年 2 月版)
github
那時年少6 小时前
从需求到技术选型:我是怎么做自然语言数据分析的
github
CoderJia程序员甲11 小时前
GitHub 热榜项目 - 日榜(2026-02-17)
ai·大模型·github·ai教程
Kusunoki_D11 小时前
在GitHub Pages仓库上设置个人网页
github
嫂子开门我是_我哥11 小时前
GitHub介绍指南
github
阿里嘎多学长19 小时前
2026-02-16 GitHub 热点项目精选
开发语言·程序员·github·代码托管
xuhe21 天前
Mihon/Tachiyomi漫画插件分析(侧重目前插件现状分析和英文插件推荐)
github·tachiyomi
小锋学长生活大爆炸1 天前
【教程】PicoClaw:在嵌入式设备上部署OpenClaw
docker·github·教程·工具·openclaw·picoclaw
secondyoung1 天前
Git使用:Git使用问题及解决方法总结
windows·经验分享·git·vscode·gitee·github·gitcode