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

相关推荐
高志小鹏鹏1 小时前
告别“修复 bug”:让别人一眼看懂你的 Commit
git·github·代码规范
李同学Lino2 小时前
别让你的 AI 太安逸!我给代码 Agent 装上了“大厂 PUA”插件,产出直接翻倍(附保姆级教程)
github
用户7365436807432 小时前
用 n8n + GitHub API 搭建 AI 开源项目自动监控系统(Docker 部署 + 评分模型 + Lark推送)
github
逛逛GitHub2 小时前
这个 GitHub 项目很有意思啊,解了死磕30 年的前端难题。
github
m0_694845573 小时前
UVdesk部署教程:企业级帮助台系统实践
服务器·开发语言·后端·golang·github
程序员小崔日记3 小时前
一个命令救命:GitHub 爆火项目 thefuck,真把我笑服了
github·bash·开发者·宝藏项目
darkb1rd4 小时前
career-ops:Go 语言驱动 AI 求职系统实战指南
开源·github·好物分享
HakunamatataWang4 小时前
怎么把github的本地的repo上传给gitea
github·gitea
AI成长日志5 小时前
【GitHub开源项目专栏】AI推理优化框架深度解析(下):TGI与TensorRT-LLM对比实战
人工智能·开源·github