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

相关推荐
安得权42 分钟前
使用GitHub CLI(gh)来创建 GitHub Issue
github·issue
Student_Zhang44 分钟前
一个管理项目中所有弹窗的弹窗管理器(PopupManager)
前端·ios·github
哎呦喂1 小时前
插件如何实现行内代码补全?
github
未名编程2 小时前
本地项目上传 GitHub 私有库:GitHub CLI 与 Git 原生双方案详解
git·github
2501_946213903 小时前
Zettlr(科研笔记) v4.0.0 中文免费版
java·经验分享·笔记·pdf·github·ocr·开源软件
C_心欲无痕3 小时前
git - git push同时推送GitHub和Gitee两个远程仓库
git·gitee·github
FIT2CLOUD飞致云3 小时前
汇报丨1Panel开源面板2025年终总结
linux·运维·服务器·开源·github·1panel
桃花键神15 小时前
2025远程桌面软件年终推荐榜单:ToDesk、RustDesk、向日葵、UU和QQ远程
github
携欢16 小时前
POrtSwigger靶场之Exploiting XXE using external entities to retrieve files通关秘籍
网络·安全·github
时光Autistic18 小时前
【安装教程】Git安装完整步骤
git·github