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博客

相关推荐
CoderJia程序员甲11 小时前
GitHub 热榜项目 - 日榜(2025-12-4)
ai·开源·大模型·github·ai教程
青瓷看世界12 小时前
鸿蒙开发时AI编程工具codeGenie与Github Copilot的区别
github·copilot·ai编程·harmonyos·codegenie
逛逛GitHub13 小时前
10 个 YYDS 的技巧:Google 官方教你用 Nano Banana Pro
github
深圳市恒讯科技13 小时前
美国服务器备份策略:快照、异地备份与恢复演练指南
运维·服务器·github
yoyo君~13 小时前
本地仓库推送到github
学习·github·无人机
帅得不敢出门14 小时前
Android8 Framework实现Ntp服务器多域名轮询同步时间
android·java·服务器·python·framework·github
一点一木14 小时前
🚀 2025 年 11 月 GitHub 十大热门项目排行榜 🔥
前端·人工智能·github
没头脑的男大16 小时前
Github上传大文件方式,适合小白
github
时光追逐者17 小时前
一个免费且实用的 GitHub 工具,可将 GitHub 的 README 翻译成多种语言!
github
帅得不敢出门17 小时前
Android11~13 Framework实现Ntp服务器多域名轮询同步时间
android·服务器·python·framework·github