git push 时 rejected

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

posted @ 2015-11-26 11:18  wuzhiyi  阅读(579)  评论(0编辑  收藏  举报