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

相关推荐
Rhi6378 小时前
第 2 篇|吐槽向:那些年我们配过的环境,这次终于能跑起来了
react.js·github
孟俊宇-MJY8 小时前
Ansible自动化运维
git·github
用户8244514997010 小时前
点到线段距离怎么求导?一个被忽视的"硬边界"微分难题!
github
用户8244514997010 小时前
一行代码让 sign()、round() 可微:sll-core 源码解读与边界梯度机制。
github
无限进步_10 小时前
【C++】从红黑树到 map 和 set:封装设计与迭代器实现
开发语言·数据结构·数据库·c++·windows·github·visual studio
ZOE^V111 小时前
springcloud笔记
笔记·spring cloud·github
microxiaoxiao11 小时前
Aeroshell 插件系统初体验:打造可自定义的现代智能工作台
github
冴羽yayujs12 小时前
GitHub 前端热榜项目 - 日榜(2026-05-09)
前端·github
DogDaoDao13 小时前
【GitHub】TextGen:开源本地大模型运行平台的终极解决方案
人工智能·深度学习·自然语言处理·开源·大模型·github·textgen