【Git】Gitbash使用ssh 上传本地项目到github

SSH Git上传项目到GitHub(图文)_git ssh上传github-CSDN博客

前提 ssh-keygen -t rsa -C "自己的github电子邮箱" 生成密钥,公钥保存到自己的github的ssh里

1.先创建一个仓库,复制ssh地址

powershell 复制代码
git init
git add .
git commit -m "first commit"

2.测试连接github

powershell 复制代码
ssh -T git@github.com

3.git remote add origin + 一开始复制的仓库ssh地址

powershell 复制代码
git remote add origin git@github.com:kk0416/HelloQML.git

4.git push -u origin + 分支名

powershell 复制代码
git push -u origin master


5.上传成功

相关推荐
瑞瑞小同学7 小时前
git 常用相关操作
git
金銀銅鐵8 小时前
[git] 如何合并若干个 commit?(上)
git
洛菡夕12 小时前
NoSQL之Redis配置与优化
redis·git·nosql
wohehe12 小时前
Android项目工程化-Github Actions
linux·github
Yunzenn13 小时前
CRAG 架构与置信度路由
github
逛逛GitHub16 小时前
YC 总裁开源了自己亲手写的 AI Agent 大脑,1 周就 1 万点赞。
github
游九尘17 小时前
git只忽略自己本地的文件,其他人的文件正常提交
git
SiYuanFeng18 小时前
新手学Git:以一个小游戏项目为例,完成初始化、提交、查看历史与恢复版本
大数据·git·elasticsearch
CoderJia程序员甲18 小时前
GitHub 热榜项目 - 日榜(2026-04-21)
ai·大模型·llm·github·ai教程
Garfield200519 小时前
基于 GitHub 开源项目二次开发:Upstream 同步、Merge / Rebase 边界与实践
开源·github