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: