GitHub第一次上传遇到的问题

第一步,在github上先建立一个新仓库 new respository

填写 名字、基本信息、设置public/private,我选择的public

create 复制好地址

第二部  本地仓库

建立好文件夹,右键选择 git bash here 

1 echo # repository name>> README.md
2 git init
3 git add README.md
4 git commit -m "first commit"
5 git remote add origin git@github.com:your name/repository name.git
6 git push -u origin master

以上是网上的一个步骤
我用的另一种方法 git clone 上面保存的地址
cd 文件名 //进入文件夹
1,git add . //添加所有文件
2,git commit -m "xinxi "
3,git push -u origin master //推送到远程仓库
这里遇到一个错误

 

解决方法链接:https://blog.csdn.net/qq_43442524/article/details/105951479

 
原文地址:https://www.cnblogs.com/20191204C/p/12877134.html