当前位置:   article > 正文

git push -f

git push -f
有的时候使用GIT工作时,会遇到一下这种问题,
  1. Pushing to git@github.com:519ebayproject/519ebayproject.git
  2. To git@github.com:519ebayproject/519ebayproject.git
  3. ! [rejected] master -> master (non-fast-forward)
  4. error: failed to push some refs to 'git@github.com:519ebayproject/519ebayproject.git'
  5. hint: Updates were rejected because the tip of your current branch is behind
  6. hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
  7. hint: before pushing again.
  8. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
我遇到造成这个问题的原因,一般是因为执行了git reset命令,版本回退后没有恢复,造成本地仓库的提交版本号落后于远端仓库的提交版本号。
可以执行 git push -f命令去强制提交
本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号