github中git push origin master出错:error: failed to push some refs to

由于工作忙的原因,也是自己懒的原因,本来有机会跟git更深入的接触,确因工作原因与git失之交臂。

今天在github上创建了自己的第一个公共仓库,然后上传了第一项目。

github入门到上传本地项目

在提交远程仓库期间遇到一个小问题:  就是本文标题错误,查阅资料发现,原来是在github的版本库里的README.md文件没有Pull到本地库

先执行:git pull --rebase origin master

try git pull rebase origin master

?

可以看到,此时已经把github上最新的文件下载下来了:

now have downloded readme.md file from github repo

即,那个README.md文件。

4.接着再去:

git push origin master

now do git push origin master ok

?
1
2
3
4
5
6
7
8
9
10
11
Administrator@PC-20131018OHXV  /cygdrive/e/dev_root/git/crifanLib
$ git push origin master
Username  for 'https://github.com' :
Password  for 'https://[email protected]' :
Counting objects: 19,  done .
Delta compression using up to 4 threads.
Compressing objects: 100% (14 /14 ),  done .
Writing objects: 100% (18 /18 ), 112.33 KiB,  done .
Total 18 (delta 0), reused 0 (delta 0)
To https: //github .com /crifan/crifanLib .git
    6bae951..32d67c7  master -> master

 

即可成功把本地的文件都上传到github上面去了。

5.此时再去github网站上也就可以看到对应文件了:

github project can see files



猜你喜欢

转载自blog.csdn.net/nly19900820/article/details/73428619