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

相关推荐
逛逛GitHub13 小时前
推荐 8 个本周 YYDS 的 GitHub 开源项目。
github
逛逛GitHub13 小时前
这个 GitHub 上 1.6 万人点赞 AI PPT 工具,生成的 PPT 能编辑。
github
stereohomology14 小时前
ChatGPT对我首个Github开源的MCP的点评
chatgpt·开源·github
xiaoliuliu1234515 小时前
ArcGIS Pro 3.5.4专业桌面地理信息系统安装教程 Windows版:运行库+升级包+汉化补丁指南
github
_大学牲15 小时前
从零实现自己的agent第六期:Agent Team团队协作
github·agent·ai编程
_大学牲15 小时前
从零实现自己的agent第一期:什么是agent
github·agent·ai编程
_大学牲15 小时前
从零实现自己的agent第二期: 百行代码从零手搓agent
github·agent·ai编程
程序员柒叔16 小时前
OpenCode 一周动态-2026-W20
人工智能·github·copilot·agent·opencode
晚风_END16 小时前
Linux|操作系统|最新版zfs编译后的适用于centos7的rpm安装包完全离线安装介绍
linux·运维·服务器·c++·python·缓存·github
辰痕~17 小时前
使用GitHub管理代码
github