赞
踩
执行push
出现问题:
git push origin master
此时报错信息如下:
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to ‘https://github.com/xxxxxxx/xxxxxxx.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.
解决思路
① 同步云端到本地,取消两者差异
② 重新push
到云端
解决方案
#方案1
git pull origin master --allow-unrelated-histories
git add xxx #添加差异文件
git push origin master
#方案2:强制上传
git push -f origin master
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。