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

相关推荐
文静小土豆2 小时前
CentOS 7 OpenSSH 10.2p1 升级全攻略(含离线安装与回退方案)
linux·运维·centos·ssh
Lunar*4 小时前
告别臃肿!使用 git-filter-repo 优雅清理 Git 历史记录
git
tq10864 小时前
agent 记忆 = markdown + json + git
人工智能·git
whynerve4 小时前
使用Pixi构建Python环境
github
uyeonashi4 小时前
自动化测试问卷考试系统测试报告
功能测试·selenium·github
用户579854769715 小时前
06:WebSocket 实时通信:流式响应与工具调用通知
github
失迭5 小时前
Cloudflare Tunnel + Zero Trust 稳定接入 Netcup VPS SSH
前端·javascript·github
何以不说话6 小时前
DevOps、Git 和 GitLab
git·gitlab·devops
前端小雪的博客.6 小时前
Vue2 项目专属 GitHub Copilot 配置:精准匹配技术栈(附完整配置文件)
github·copilot
圣心6 小时前
GitHub Copilot 教程
github·copilot