是否有针对git-mergetool的标志,其行为类似于git-log中的--follow
--follow
Continue listing the history of a file beyond renames (works only
for a single file).基本上,我希望它合并重命名的文件,而不是认为它们被删除了。
git-mergetool提供了以下功能:
When git mergetool is invoked with this tool (either through the -t
or --tool option or the merge.tool configuration variable) the
configured command line will be invoked with $BASE set to the name
of a temporary file containing the common base for the merge, if
available; $LOCAL set to the name of a temporary file containing
the contents of the file on the current branch; $REMOTE set to the
name of a temporary file containing the contents of the file to be
merged, and $MERGED set to the name of the file to which the merge
tool should write the result of the merge resolution.因此,在重命名/移动文件的情况下,我希望BASE/LOCAL/REMOTE仍然有效。我希望git-mergetool“遵循”BASE的重命名为本地或远程,视情况而定。
发布于 2012-12-13 07:06:33
git mergetool本身并不执行合并,只是帮助清理由于已经在进行的合并而产生的冲突。因此,将该选项应用于mergetool命令没有任何意义。
为git merge提供该选项也是没有意义的。合并将始终将文件移动考虑在内。仅当git log命令覆盖其他行为时,才需要--follow选项。因为您引用的位表明该选项仅在获取单个文件的日志时适用,在这种情况下,您已经表示您只对该特定文件感兴趣。--follow选项可用于指示您还需要有关该文件以前名称的信息。
https://stackoverflow.com/questions/13850089
复制相似问题