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 小时前
GitHub 关注突破 2w,我总结了 10 个涨星涨粉技巧!
前端·后端·github
HelloGitHub4 小时前
《HelloGitHub》第 119 期
开源·github
冬奇Lab16 小时前
一天一个开源项目(第35篇):GitHub Store - 跨平台的 GitHub Releases 应用商店
开源·github·资讯
Jahzo18 小时前
openclaw桌面端体验--ClawX
人工智能·github
逛逛GitHub20 小时前
6个粉丝推荐的 GitHub 项目,收藏一波。
github
MaoPou1 天前
Hello Haxe篇
github
Bigger1 天前
为什么你的 Git 提交需要签名?—— Git Commit Signing 完全指南
git·开源·github
慢慢开始吧2 天前
Redmi Note 7 Pro (Violet) 爆改满血 Linux 掌上服务器指南
github