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

相关推荐
别动我齐刘海31 分钟前
ROS2 Jazzy + C++ 实战路线——ros2_control
c++·人工智能·python·opencv·机器学习·机器人·github
怕浪猫1 小时前
ZCode 开源了来看看这是个什么东西
node.js·github·代码规范
demo007x2 小时前
我用 AI 做了一个跨平台的PopClip:拾趣Magpie
程序员·github·ai编程
miofly2 小时前
GitHub 日榜趋势速报 | 2026-09-22
开源·github
我命由我1234515 小时前
Git 推送报错:error: src refspec main does not match any
运维·git·gitee·github·运维开发·学习方法·版本控制
阿里嘎多学长16 小时前
2026-09-20 GitHub 热点项目精选
开发语言·程序员·github·代码托管
峰向AI17 小时前
skill-up: [阿里开源] 让 AI Agent Skills 自己进化的评估工具
github
子林super20 小时前
顺序表用Python3定义与增删改查
github
子林super20 小时前
Python非空判断与类型检查写法
github
子林super20 小时前
Python list与array关键区别及使用场景
github