码迷,mamicode.com
首页 > 其他好文 > 详细

git push 时 rejected

时间:2015-11-26 13:00:44      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:

git push遇到的问题:

wuzhiyi@IBM367-PB3Z5TM MINGW64 ~/workspace/HelloWorld/src/selenium (master)
$ git push osc master
To git@git.oschina.net:wuzhiyi51/selenium_learn.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to ‘git@git.oschina.net:wuzhiyi51/selenium_learn.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 push -u osc master -f
Total 0 (delta 0), reused 0 (delta 0)
To git@git.oschina.net:wuzhiyi51/selenium_learn.git
+ 4b61567...a20bcfd master -> master (forced update)
Branch master set up to track remote branch master from osc.

$ git push osc master
Everything up-to-date

git push 时 rejected

标签:

原文地址:http://www.cnblogs.com/wuzhiyi/p/4997120.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!