git误区error: failed to push some refs to '[email protected]:

网上git入门很多,重点却总是一笔带过,总是讲一些简单命令,那些都烂大街了,再写也没意思了

先说github

创建新仓库时注意


不要点这个

Initialize this repository with a README

This will let you immediately clone the repository to your computer. Skip this step if you’re importing an existing repository.

这句话意思是 用一个 readme初始化这个仓库

他会使你可以立即克隆这个仓库当你的电脑,如果你要导入一个已存在的工程请跳过他


就这句话,诞生了多少错误,下面再说,接下来创建好后,他会有一个提示,如下

照着这个步骤敲,肯定能成功


放几个链接

https://www.jianshu.com/p/11859cd561c8

https://stackoverflow.com/questions/9794413/failed-to-push-some-refs-to-githeroku-com


failed to push some refs to [email protected]的问题大概都是这种问题

本地仓库和远程仓库不一致,除非强制上传,不过这样也不太好吧

https://jingyan.baidu.com/article/f3e34a12a25bc8f5ea65354a.html

也是这个问题,

Administrator@PC-20150110FGWU /K/cocos2d/yc (master)

$ git push -u origin master

To [email protected]:yangchao0718/cocos2d.git

 ! [rejected]        master -> master (non-fast-forward)

error: failed to push some refs to '[email protected]:yangchao0718/cocos2d.git

hint: Updates were rejected because the tip of your current branch is behin

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.

不想做格式了,最近有点忙,纯记录下,自己踩的坑,水货教程太多了,重点都没get到








猜你喜欢

转载自blog.csdn.net/uotail/article/details/80211897