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

相关推荐
葬送的代码人生几秒前
别再「Ctrl+C/V」了!Git 开发必备技能,10 分钟告别单机码农
前端·github·代码规范
码农翻身9 分钟前
GitHub,2008年生,2048年卒
github
文滨32 分钟前
10分钟搞定!Mac 配置 GitHub SSH 完全指南(小白也能看懂)
前端·macos·ssh·github
MicrosoftReactor1 小时前
技术速递|六个编码智能体,一个生产级系统:基于 AKS-Lab-GitHubCopilot 的 AgenticOps 实战指南
ai·github·copilot·智能体
weelinking1 小时前
【claude】15_Claude使用经验与最佳实践
前端·人工智能·python·sql·数据挖掘·前端框架·github
DogDaoDao1 小时前
【GitHub】AgentMemory 深度解析:让 AI 编程代理拥有持久化记忆的 16K+ Star 开源方案
人工智能·开源·大模型·github·aigc·ai编程·aiagent
热点速递1 小时前
老程序员怒斥GitHub不行了!1.5亿人用的代码仓库要完?
github·业界资讯
STDD17 小时前
Soulmask《灵魂面具》 专用服务器搭建教程
运维·服务器·github
lolo大魔王17 小时前
Linux的监测程序
linux·运维·github
米高梅狮子21 小时前
Redis
数据库·redis·mysql·缓存·docker·容器·github