git上传

1、进入上传文件夹: git init

2、git add .

3、git commit -m "first commit"

4、git remote add origin https://github.com/Deepcong2019/face_recognition.git

5、git push -u origin master

 

 

报错信息:

更新被拒绝,因为远程仓库包含您本地尚不存在的提交。这通常是因为另外 提示:一个仓库已向该引用进行了推送。再次推送前,您可能需要先整合远程变更

6、git push -u origin +master​

继续报:

error: src refspec master​ does not match any.
error: 无法推送一些引用到 ‘[email protected]:xxx.git’

7、git pull

8、git push origin master

继续报错:

提示:更新被拒绝,因为您当前分支的最新提交落后于其对应的远程分支。 提示:再次推送前,先与远程变更合并(如 'git pull ...')。详见 提示:'git push --help' 中的 'No

9、git merge origin/master

10、git push origin master

 

原因应该是   在创建仓库时,同时创建了readme.md、licence文件。

 

你可能感兴趣的:(git上传)