【GitHub】git上传代码 学习笔记

1.新建仓库

2.设置ssh key

将C:\Users\pc\.ssh下的id_rsa.pub用notepad打开拷贝到下图key中

 

3.在git shell输入

 

ssh -T git@github.com

即成功

3.gitShell 克隆你刚才新建的仓库到本地,输入命令:

git clone https://github.com/InnocenceWj/Test1.git

在C:\Users\pc\Documents\GitHub目录下,你可以看到

把想上传的项目,copy到Test1下

4.右键Test1打开gitbash,依次输入命令:

 

git init
git add "springboot-mybatis-xml" 

 

git commit -m "springboot-mybatis-xml"
 git remote add origin https://github.com/InnocenceWj/Test1.git

出现

fatal: remote origin already exists. 输入下列命令:

git remote rm origin

再输入

 

 git remote add origin https://github.com/InnocenceWj/Test1.git
 git pull origin master
git push origin master

 

 

 

gitHub:

 

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值