如何“解决"问题? git rerere解析 [英] How to "fixup" git rerere resolution
问题描述
我的工作流程通常由merge -> resolve conflicts -> commit -> debug during compilation -> fixup commit
组成.这样,我就可以合并污垢,然后再进行清理.如果启用rerere
,将始终记录肮脏的分辨率.如何绕开这个问题?有没有一种方法可以通过遵循提交来修复rerere
分辨率?
My workflow usually consists of merge -> resolve conflicts -> commit -> debug during compilation -> fixup commit
. In this way I make dirty merge with clearing afterwards. If I enable rerere
I would always have dirty resolutions recorded. How to bypass this problem? Is there a way to fix rerere
resolution by following commit?
推荐答案
这很笨拙,但是我为最近一次严重的合并做了什么.
It is clumsy but what have I did for my last big bad merge.
首先,我将我的分支签出到tmp分支中的合并状态之前. 然后运行类似的合并.然后执行以下过程:
At first I have checkout my branch to before merge state in tmp branch. Then run similar merge. Then do following process:
for F in `git show $FIXCOMMIT --stat | awk '{print $1}' | tail -n +7 | head -n -1`; do
git checkout -m $F
git rerere forget $F
cp $FIXED/$F ./$F
done
在FIXCOMMIT提交修复的情况下. FIXED是具有FIXCOMMIT状态的工作树.
Where FIXCOMMIT is commit with fixes. And FIXED is workingtree with FIXCOMMIT state.
作为一个教训,我认为不应在编译之前进行合并.
As a lesson I think that one shouldn't commit merge before compilation.
这篇关于如何“解决"问题? git rerere解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!