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

来源:互联网 发布:abs点胶机300ds编程 编辑:程序博客网 时间:2024/05/19 18:42

由于工作忙的原因,也是自己懒的原因,本来有机会跟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://crifancrifancrifan@github.com':
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



阅读全文
0 0