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

相关推荐
码流怪侠41 分钟前
用 WiFi 信号数人头:howmanypeoplearearound 项目深度解析
后端·开源·github
大强同学3 小时前
零成本部署0penList,三步搞定,我一分钱没花!
github
IT摆渡者7 小时前
VM EXSI7.0存储硬盘故障处理
大数据·linux·github
Narrastory7 小时前
我用 Claude Code 写代码不到 2 小时,却花了 3 天做完这个软件—Vibe Coding 的正确姿势,是设计不是生成
前端·人工智能·github
AI Dog8 小时前
GitHub 项目整体替换与大文件处理指南
github
March.s8 小时前
Nginx 服务器反向代理实战指南
服务器·nginx·github
逛逛GitHub8 小时前
在 Codex 中用这 4 个 SKill,让你拍的照片变高级。
github
村雨遥9 小时前
覆盖提交不等于删除,这才是彻底清除 Git 历史的正确姿势
git·github
FlightYe9 小时前
linux系统编程(八):阻塞与非阻塞IO对比
android·linux·运维·服务器·github·vim
kaixin_啊啊9 小时前
GitHub 开源 Qwen-MM-Plugins 小白入门,给 Codex 装上多模态工具箱
开源·github