当我将我的分支my-feature用 master 进行变基时,会出现冲突:
如果我将my-feature直接合并到master分支,那么它就能正常工作:
我尝试进行新的克隆以确保与远程同步并处于干净状态。
为什么明明普通合并没有问题,变基却失败了呢?
我已经使用 Git 几年了,之前从未遇到过这种情况,并且一直认为如果合并成功(没有冲突),则变基也会成功,反之亦然。
[my-feature]$ git rebase master
Applying: ...
Using index info to reconstruct a base tree...
M vars/file.txt
Falling back to patching base and 3-way merge...
Auto-merging vars/file.txt
CONFLICT (content): Merge conflict in vars/file.txt
error: Failed to merge in the changes.
如果我将my-feature直接合并到master分支,那么它就能正常工作:
[master] $ git merge my-feature
Merge made by the 'recursive' strategy.
..
我尝试进行新的克隆以确保与远程同步并处于干净状态。
为什么明明普通合并没有问题,变基却失败了呢?
我已经使用 Git 几年了,之前从未遇到过这种情况,并且一直认为如果合并成功(没有冲突),则变基也会成功,反之亦然。