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

相关推荐
lkbhua莱克瓦2410 小时前
Java基础——常用算法5
java·开发语言·笔记·github
电摇小人10 小时前
GitHub 全方位指南(续):实战进阶与生态拓展
github
粥里有勺糖12 小时前
视野修炼-技术周刊第126期 | TypeScript #1
前端·node.js·github
lkbhua莱克瓦241 天前
Java基础——常用算法4
java·数据结构·笔记·算法·github·排序算法·快速排序
John Song1 天前
git多个账号管理
git·github
破烂pan1 天前
github精选Agent学习repo
llm·github·agent
XU磊2601 天前
Git 实现github仓库管理-删除指定目录下的所有文件并保留目录结构
git·github
逛逛GitHub2 天前
1 天狂揽 4000 多 Star 的 AI 舆情分析开源神器。
github
卡洛斯(编程版2 天前
大仓库推到GitHub大踩坑-Git LFS从安装到使用
git·github
玥轩_5212 天前
Git命令速查手册
大数据·git·elasticsearch·gitee·github·命令速查