【发布时间】:2019-10-01 04:21:53
【问题描述】:
我知道以前有人问过这个问题,但我似乎无法理解这件事......
git checkout master
git pull
git git checkout feature
git rebase origin/master
then resolve all the problems....
Try to push - not gonna happen...
git 真的在告诉我,在做了一个 rebase 之后(处理 n:ths 的冲突)
我有两个选择,使用 --force,这看起来既危险又愚蠢。
或再次pull 并再次处理合并冲突...并以同样的情况结束?
error: failed to push some refs to 'ssh://git@git.zzz.com/yyy/xxx.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.
我在本地有:特性分支,master(最新)
和远程:featureBranch(现在领先了?!)和 master。
我只想更新我的功能分支,使其更接近 master 上的版本... 为什么git会这样……
我已经阅读了很多关于此的主题,唯一的解决方案似乎是使用--force
对于我来说,对于这种常用工具来说,这似乎是一个解决方案......
【问题讨论】:
-
那么你在尝试推送之前解决了所有冲突吗?