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

相关推荐
朱涛的自习室1 小时前
Munk AI 正式开源:一个“自我进化”的 AI 测试引擎
android·人工智能·github
lpfasd1232 小时前
2026年第23周GitHub趋势周报
github
Aliaoo2 小时前
GitHub Copilot 改按量计费 72 小时:$28→$746 的账单、暂停新注册,以及这对普通开发者意味着什么
github·copilot
撸码小狂魔2 小时前
GitLab CI/CD 使用指南(小白版)
github
易生一世3 小时前
GitHub Copilot概述
github
暴雨课堂3 小时前
宝塔和云效webhook配置
github
zahuilg103 小时前
Mac原生终端SSH一键快捷连接|无需装软件、极简安装、快速上手
macos·ssh·github·终端
用户1712819473754 小时前
autoflake:Python 代码里没用的 import,让它自己清掉
github
南知意-4 小时前
MonkeyCode:长亭开源的企业级AI开发平台,GitHub 3.2k Star!
人工智能·ai·开源·github·ai编程·开源项目
humpy28874 小时前
测试用记录
github