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

相关推荐
Selicens3 小时前
git批量删除本地多余分支
前端·git·后端
崔庆才丨静觅7 小时前
Claude Code GitHub Actions 使用教程
github·api·claude
闲云一鹤1 天前
Git LFS 扫盲教程 - 你不会还在用 Git 管理大文件吧?
前端·git·前端工程化
砖厂小工1 天前
用 GLM + OpenClaw 打造你的 AI PR Review Agent — 让龙虾帮你审代码
android·github
程序员鱼皮1 天前
又一个新项目完结,我要出海了!
ai·github·开源项目
徐小夕1 天前
pxcharts-vue:一款专为 Vue3 打造的开源多维表格解决方案
前端·vue.js·github
Moment1 天前
想要长期陪伴你的助理?先从部署一个 OpenClaw 开始 😍😍😍
前端·后端·github
我叫黑大帅1 天前
前端如何利用 GitHub Actions 自动构建并发布到 GitHub Pages?
前端·面试·github