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

相关推荐
灵魂学者4 小时前
Vue3.x —— 父子通信
前端·javascript·vue.js·github
元直数字电路验证5 小时前
GitHub Desktop 上传流程
github
Crystal3288 小时前
Git 基础:生成版本、撤消操作、版本重置、忽略文件
前端·git·github
Elastic 中国社区官方博客11 小时前
用 Elasticsearch 构建一个 ChatGPT connector 来查询 GitHub issues
大数据·人工智能·elasticsearch·搜索引擎·chatgpt·github·全文检索
用户3458482850511 小时前
除了使用dict.fromkeys()和OrderedDict.fromkeys(),还有哪些方法可以实现列表去重?
github
摇滚侠12 小时前
零基础小白自学 Git_Github 教程,git 命令行操作1,笔记18
笔记·git·github
无限进步_12 小时前
C++从入门到类和对象完全指南
开发语言·c++·windows·git·后端·github·visual studio
itwangyang52012 小时前
在 GitHub 上生成和配置个人访问令牌(PAT),并将其用于 R 环境中的凭证管理和包安装。
开发语言·r语言·github
love530love13 小时前
【ComfyUI/SD环境管理指南(二)】:如何避免插件安装导致的环境崩溃与“外科手术式”修复
人工智能·windows·python·stable diffusion·github·aigc·comfyui
Jonathan Star14 小时前
Git 的 pre-commit hook(以及其他钩子脚本)默认不会被 git commit 追踪,也不会被 git push 推送到远程仓库
github