赞
踩
版权声明:未经允许,随意转载,请附上本文链接谢谢(づ ̄3 ̄)づ╭❤~
https://blog.csdn.net/xiaoduan_/article/details/80904888
今天使用git更新GitHub仓库的时候出现了错误,具体错误如下
To github.com:Anthony-Duan/hbasetrain.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:Anthony-Duan/hbasetrain.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.
错误原因其实是我本地没有README.md这个文件,而远程仓库中有,
如何解决那?
很简单
git pull --rebase origin master
执行这一句就行了
执行完后会发现本地已经有了 README.md 这个文件
然后就是常规操作了
git push -u origin master
之后就可以看到GitHub上已经有了刚上传的新鲜代码啦!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。