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

相关推荐
littlex2 小时前
复盘分享:「高性价比人生指南」衍生网站,一周 8k+ 用户
github
u1301302 小时前
GitHub 热榜项目:周榜(2026-10-04)
人工智能·github
挖掘狂人3 小时前
Git 从 0 到 1:用一个小项目走完 add / commit / reset / merge / rebase / push
git·后端·github
miofly3 小时前
macOS 本地 AI 搜索工具 SCM 发布 0.2.4 版本,支持多模型照片视频检索
开源·github
codigger4 小时前
Git 三区域模型:把 add、commit、reset、merge 一次讲透
git·github·编程·编程语言
高频因子挖掘机4 小时前
行情监控脚本重启后,怎样快速恢复而不重复拉取数据?
后端·github·api
idanzk4 小时前
Git 推送 GitHub 报 SSL_READ /src refspec main 不匹配 完整踩坑记录
git·github·ssl
粥里有勺糖4 小时前
视野修炼-技术周刊第135期 | 鼠标跟随宠物
前端·github·aigc
粥里有勺糖4 小时前
拿 Codex 协助清理磁盘,Nice!
前端·后端·github
miofly6 小时前
GitHub 日榜趋势速报 | 2026-10-05
开源·github