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 小时前
Git 和 GitHub:(十四)rebase 到某个有新提交的远程仓库的分支
git·github
小弥儿2 小时前
GitHub今日热榜 | 2026-07-31:AI Agent工作流共享赛道升温
人工智能·学习·github
白猫不黑15 小时前
GitHub 30K Star 的 AI 渗透测试工具
web安全·网络安全·信息安全·渗透测试·github·ai渗透测试
炸膛坦客16 小时前
Git 和 GitHub:(十二)基于远程仓库的某一个分支的某一笔提交创建新分支
git·github
一点一木17 小时前
🚀 2026 年 7 月 GitHub 十大热门项目排行榜 🔥
人工智能·github
阿里嘎多学长17 小时前
2026-07-30 GitHub 热点项目精选
开发语言·程序员·github·代码托管
炸膛坦客17 小时前
Git 和 GitHub:(十三)改分支名
git·github
维基框架1 天前
GitHub供应链安全再升级 真正改变的是发布流程
人工智能·安全·github
起个破名想半天了1 天前
Git 本地项目关联远程仓库教程
git·github·git教程
lazy H1 天前
Git worktree 怎么用?同时开发多个分支完整教程
大数据·git·后端·学习·搜索引擎·github