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

相关推荐
烟锁池塘柳01 天前
GitHub 强制回退版本并覆盖远程仓库
git·github
Maggie_ssss_supp1 天前
Linux-MySQL主从复制
github
cg50171 天前
Continue插件实现本地部署一个“cursor”或“github copilot”
github·copilot·curcor
妙娲种子1 天前
gittee连接github镜像
gitee·github
无限进步_1 天前
C语言实现贪吃蛇游戏完整教程【最终版】
c语言·开发语言·c++·git·游戏·github·visual studio
CoderJia程序员甲1 天前
GitHub 热榜项目 - 日榜(2026-01-21)
ai·开源·大模型·github·ai教程
亮子AI1 天前
【Github】如何取消 issue 自动加入 project 的功能?
github·issue
徐小夕@趣谈前端1 天前
【推荐】jitword协同文档新增AI公文助手,一键生成红头文件
vue.js·人工智能·开源·编辑器·github
Allen_LVyingbo1 天前
用Python实现辅助病案首页主诊断编码:从数据清洗到模型上线(上)
开发语言·python·github·知识图谱·健康医疗
海雅信子1 天前
上传本地文件到github
github