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 小时前
GitHub自动化利器:Probot框架实战指南
运维·自动化·github
掘我的金3 小时前
galgamex 容器化部署实战:从 Dockerfile、Compose 到 Prisma 初始化与首个账号
github
我的收藏手册3 小时前
性能监控shell脚本编写
前端·git·github
CoderJia程序员甲3 小时前
GitHub 热榜项目 - 日榜(2025-09-07)
ai·github·开源项目·github热榜
掘我的金7 小时前
Text2Light 安装案例:从 GPU 可用到 OpenEXR 报错,再到顺利出图(Windows + Conda)
github
杨杨杨大侠7 小时前
第3章:实现基础事件总线
java·github·eventbus
杨杨杨大侠7 小时前
第4章:添加注解支持
java·github·eventbus
libokaifa7 小时前
C++ 基础学习
前端·架构·github
wallflower20207 小时前
从零到全流程 CI/CD:多技术栈项目自动化部署实战与优化指南
ci/cd·github
绝无仅有8 小时前
某大厂MySQL面试之SQL注入触点发现与SQLMap测试
后端·面试·github