我正在尝试重新绑定一个分支,并且git正在推出,因为它正在尝试执行一些失败的合并操作.我怎么得到git来阻止这个?
# git rebase -f --onto master~2 master~ master
First, rewinding head to replay your work on top of it...
Applying: r1002 - CS 1.0.23
Using index info to reconstruct a base tree...
M about.html
<stdin>:68: trailing whitespace.
<stdin>:115: trailing whitespace.
<stdin>:201: trailing whitespace.
<stdin>:2369: trailing whitespace.
<stdin>:2385: trailing whitespace.
warning: squelched 2305 whitespace errors
warning: 2310 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging about.html
CONFLICT (content): Merge conflict in about.html
Failed to merge in the changes.
Patch failed at 0001 r1002 - 1002
The copy of the patch that failed is found in:
/local/melder/tmp/test/.git/rebase-apply/patch
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
Run Code Online (Sandbox Code Playgroud)
正如您所看到的,有2000多个空白错误,而不是易于手动合并的东西.
编辑:现在没有合并,我现在做了一步:
# git add -A
# git rebase --continue
Run Code Online (Sandbox Code Playgroud)
编辑:没关系,这是一个愚蠢的想法.
小智 19
我今天遇到了同样的问题:由于空白错误导致冲突导致rebase失败.对于whitespace
选项(git rebase --whitespace=fix
和git rebase --whitespace=nowarn
)的不同设置失败的试验后,对我有用的解决方案是忽略递归合并策略中的尾随空白错误(git rebase --abort
如果需要,首先运行任何转折):
git rebase -Xignore-space-at-eol <newbase>
Run Code Online (Sandbox Code Playgroud)
取决于那种空白错误,选项-Xignore-space-change
和-Xignore-all-space
可能更有用.我不知道该选项--ignore-whitespace
是否也有效.
这不会支持这个问题.您现在在文件中有冲突标记!
空白问题是警告,你不应该有尽可能多的合法冲突.如果文件是要解决的噩梦,您可能需要手动重建它.这取决于你正在做什么.
很多时候,这两个基地是如此不同,以至于每次提交你都会让你处理这场可怕的冲突.我倾向于避开rebase工作流程并订阅合并/重置.这就是我的工作:http://dymitruk.com/blog/2012/02/05/branch-per-feature/
如果您的问题只是行结尾等空白问题,您可以先尝试通过在每一侧执行过滤器分支或交互式rebase来清理存储库,以使每个提交的空白保持一致.
我还使用超越比较3或Perforce Merge来做冲突解决.BC3具有语法感知能力,应该最好地处理空白.很多时候,它甚至都不会打开,因为它会为你解决冲突,你可以继续.
归档时间: |
|
查看次数: |
15508 次 |
最近记录: |