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

相关推荐
JinSo13 小时前
Ultracite:为 AI 时代打造的零配置代码规范工具
前端·javascript·github
uhakadotcom14 小时前
Next.js 从入门到精通(1):项目架构与 App Router—— 文件系统路由与目录结构全解析
前端·面试·github
x***587019 小时前
GitHub星标10万+的Redis项目,使用教程
数据库·redis·github
九夜20 小时前
基于 .ibd 文件恢复 MySQL 数据全流程
后端·github
油丶酸萝卜别吃21 小时前
GitHub 上查找中国乡镇经纬度范围数据的开源项目
git·github
郭小铭21 小时前
React Suite v6:面向现代化的稳健升级
react.js·前端框架·github
小莫分享1 天前
Github Action 一键部署HTML 静态服务
前端·html·github
u***j3242 天前
GitHub上10个优秀的微服务开源项目
微服务·开源·github
CozyOct12 天前
⚡️2025-11-19GitHub日榜Top5|30秒部署热点助手
github
Zzz 小生2 天前
Github-Go语言AI智能体开发套件:构建下一代智能代理的利器
人工智能·golang·github