首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >git mergetool --关注?

git mergetool --关注?
EN

Stack Overflow用户
提问于 2012-12-13 06:52:50
回答 1查看 312关注 0票数 4

是否有针对git-mergetool的标志,其行为类似于git-log中的--follow

代码语言:javascript
复制
   --follow
       Continue listing the history of a file beyond renames (works only
       for a single file).

基本上,我希望它合并重命名的文件,而不是认为它们被删除了。

git-mergetool提供了以下功能:

代码语言:javascript
复制
       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的重命名为本地或远程,视情况而定。

EN

回答 1

Stack Overflow用户

发布于 2012-12-13 07:06:33

git mergetool本身并不执行合并,只是帮助清理由于已经在进行的合并而产生的冲突。因此,将该选项应用于mergetool命令没有任何意义。

git merge提供该选项也是没有意义的。合并将始终将文件移动考虑在内。仅当git log命令覆盖其他行为时,才需要--follow选项。因为您引用的位表明该选项仅在获取单个文件的日志时适用,在这种情况下,您已经表示您只对该特定文件感兴趣。--follow选项可用于指示您还需要有关该文件以前名称的信息。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13850089

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档