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

相关推荐
逛逛GitHub1 小时前
4 个热门的 GitHub 开源项目
github
程序员鱼皮4 小时前
GitHub 关注突破 2w,我总结了 10 个涨星涨粉技巧!
前端·后端·github
程序员小崔日记7 小时前
如何将代码轻松上传到 Gitee?Git 使用全攻略!
git·gitee·上传
HelloGitHub7 小时前
《HelloGitHub》第 119 期
开源·github
冬奇Lab19 小时前
一天一个开源项目(第35篇):GitHub Store - 跨平台的 GitHub Releases 应用商店
开源·github·资讯
Jahzo1 天前
openclaw桌面端体验--ClawX
人工智能·github
逛逛GitHub1 天前
6个粉丝推荐的 GitHub 项目,收藏一波。
github
MaoPou1 天前
Hello Haxe篇
github