Git

git 关联远程版本库之后push 报错 failed to push some refs to

 
在本地创建了一个项目 执行
 
git init 

然后在github后台创建新项目的时候 勾选了Initialize this repository with a README
然后github默认生成了一个README.md 文件。
git客户端关联远程版本库
 
git remote add origin git@github.com:<<your name>>/learngit.git
git commit -m 'first'
git push

然后报错:
 
error: failed to push some refs to 'https://github.com/songlin51/jandan.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

是怎么回事?
已邀请:

张三俗

赞同来自:

 
先执行 
 
git pull --rebase origin master

然后在执行:
 
git push

要回复问题请先登录注册