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

相关推荐
飞乐鸟2 小时前
Github 3.3k Star!一款开源的PDF工具包!
pdf·github
007张三丰3 小时前
掌握核心!Git最常用的15个命令行:从入门到实战详解
git·gitlab·github·git命令行·常用命令行
民工哥技术之路3 小时前
微软用 Rust 写了个新编辑器!小巧轻量却功能强大,Github 狂揽 13400+ Star
github
前端 贾公子5 小时前
如何在 Github 上规范的提交 PR(图文详解)
github
汪海游龙5 小时前
03.13 AI 精选:1-bit 大模型官方推理框架
github·hacker news
闫记康9 小时前
scp工具
linux·运维·服务器·学习·ssh·github
逛逛GitHub9 小时前
狠狠的 Pua 你的 OpenClaw 小龙虾,这 2 个 GitHub 项目开源了。
github
testresultstomorrow12 小时前
GitHub 代码上传与故障排除实战指南
经验分享·笔记·开源·github
啊巴矲13 小时前
小白从零开始勇闯人工智能:GitHub基础入门(下)
github
研究点啥好呢13 小时前
每日GitHub热门项目推荐 | 2026年3月9日(补充)
ai·开源·github·openclaw