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

相关推荐
油泼辣子多加1 小时前
2025年10月23日Github流行趋势
github
haogexiaole3 小时前
DNS解析原理及工作流程详解
网络·github
AAA阿giao6 小时前
Git 入门实践:从本地仓库到版本控制的“月光宝盒”
github·命令行
绝无仅有6 小时前
京东面试题解析:同步方法、线程池、Spring、Dubbo、消息队列、Redis等
后端·面试·github
绝无仅有6 小时前
京东面试题解析:String与StringBuilder的区别、装箱拆箱、重载与重写总结
后端·面试·github
不惑_7 小时前
如何使用 Ansible 安装 Docker
docker·github·ansible
CoderJia程序员甲13 小时前
GitHub 热榜项目 - 日榜(2025-10-23)
ai·开源·大模型·github·ai教程
想学全栈的菜鸟阿董18 小时前
Crew连接多个 MCP 服务器
运维·服务器·github
想学全栈的菜鸟阿董19 小时前
通过 Stdio(标准输入/输出)传输机制,实现 CrewAI 与本地 MCP 服务器的连接
运维·服务器·github
星光不问赶路人1 天前
彻底清理 Git 分支:从查看到批量删除无效分支的全流程指南
git·github