git误区error: failed to push some refs to 'git@github.com:

网上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 git@heroku.com的问题大概都是这种问题

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

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

也是这个问题,

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

$ git push -u origin master

To git@github.com:yangchao0718/cocos2d.git

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

error: failed to push some refs to 'git@github.com: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到








  • 3
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 12
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值