Do I have to commit a merge to make git-rerere record my conflict resolution?

后端 未结 2 1322
夕颜
夕颜 2020-12-31 04:33

I\'m using git-rerere for its intended purpose, to record conflict resolutions between two branches (master and a topic branch) incrementally as those branches

2条回答
  •  执笔经年
    2020-12-31 04:48

    Is it sufficient to just stage the conflicted files

    You must be sure to resolve the conflict without leaving conflict markers.

    See commit f427869, commit bc4caec (28 Aug 2018) by Thomas Gummerer (tgummerer).
    Suggested-by: Junio C Hamano (gitster).
    (Merged by Junio C Hamano -- gitster -- in commit d88949d, 17 Sep 2018)

    See commit b9b07ef (28 Aug 2018) by Thomas Gummerer (tgummerer).
    Helped-by: Junio C Hamano (gitster).
    (Merged by Junio C Hamano -- gitster -- in commit 4dd0c4a, 17 Sep 2018)

    .gitattributes: add conflict-marker-size for relevant files

    Some files in git.git contain lines that look like conflict markers, either in examples or tests, or in the case of Documentation/gitk.txt because of the asciidoc heading.

    Having conflict markers the same length as the actual content can be confusing for humans, and is impossible to handle for tools like 'git rerere'.

    Work around that by setting the 'conflict-marker-size' attribute for those files to 32, which makes the conflict markers unambiguous.

提交回复
热议问题