在将origin/base
分支合并到我的feature
分支后,我需要解决Parameter.java
文件上的一个冲突。 我启动了我的Git合并工具,并进行了解决。一旦解决完成,我执行了git commit
,这打开了带有默认合并提交消息的Vim编辑器。
问题是,这个默认提交消息包含以#
开始的冲突列表,因此它们将被忽略在提交消息中。
Merge remote-tracking branch 'origin/base' into feature
# Conflicts:
# Parameter.java
#
# It looks like you may be committing a merge.
# If this is not correct, please remove the file
# .git/MERGE_HEAD
# and try again.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch feature
# All conflicts fixed but you are still merging.
#
# Changes to be committed:
# modified: Parameters.java
# modified: SpecialParameters.java
# modified: Traveller.java
是否有一些配置可以添加到提交消息中,以便将这些冲突行自动放入其中?因此,在 Conflicts
部分删除冲突文件上的#
?
#
on the conflicting files in the Conflicts
part?