【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.上传成功

相关推荐
郑州光合科技余经理11 小时前
同城外卖小程序开发:下单成功后,后台导出能不能对上用户端状态
开发语言·前端·git·后端·uni-app·php·ai编程
我命由我1234511 小时前
Git 推送报错:error: src refspec main does not match any
运维·git·gitee·github·运维开发·学习方法·版本控制
阿里嘎多学长12 小时前
2026-09-20 GitHub 热点项目精选
开发语言·程序员·github·代码托管
峰向AI13 小时前
skill-up: [阿里开源] 让 AI Agent Skills 自己进化的评估工具
github
Lcr3s16 小时前
Git基础之(0):如何在Ubuntu(Linux)上安装git
git
子林super16 小时前
顺序表用Python3定义与增删改查
github
子林super16 小时前
Python非空判断与类型检查写法
github
子林super16 小时前
Python list与array关键区别及使用场景
github
子林super16 小时前
Python中None与null的区别
github
u13013019 小时前
GitHub 热榜项目:周榜(2026-09-20)
人工智能·github