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

相关推荐
阿里嘎多学长35 分钟前
2026-09-09 GitHub 热点项目精选
开发语言·程序员·github·代码托管
面包狗AI4S2 小时前
GitHub AI4S 项目观察(2026-08-28—2026-09-03)
github
GoGeekBaird2 小时前
从「跑完即销毁」到「用完再销毁」:云沙箱的一次进化
后端·github·ai编程
逛逛GitHub5 小时前
GitHub 又一个 3D 人体可视化项目,AI 能力提升催生新场景。
github
峰向AI5 小时前
多代理协作的正确姿势:Atlas让 Claude Code 和 Codex共享记忆
github
蜡台5 小时前
GitHub 关闭 Two‑factor authentication(2FA)
github
HaipengYu8 小时前
Star History 凉凉?5 分钟部署一套属于自己的 GitHub 星标统计服务
github
理智.6298 小时前
Git 工具使用之项目版本回退与修改备份:stash、reset、reflog 常用指令详解
git·gitee·github
尚雷558010 小时前
避坑指南:从零搭建 openGauss oGRAC 双节点集群,这些细节要注意
github·ograc
TunerT_TQ12 小时前
GitHub每日热评|用写HTML的方式生成确定性MP4:HeyGen开源的HyperFrames到底强在哪?
开源·github·资讯