git - git difftool 生成的 "lindex"、 "rindex"和 "wtindex"文件是什么?

标签 git git-index git-difftool

当我运行时:

git difftool -d

它创建一个临时目录,其中包含要在差异中显示的文件。结构如下所示:

tmpdir/
  left/
    file1
  lindex
  right/
    file1
  rindex

“左”“右”目录清晰。但是“lindex”和“rindex”文件是什么?它们包含什么?我如何查看它们?有时没有“rindex”,而是“wtindex”文件。

最佳答案

他们代表indexes ,由 git update-index 生成在 git-difftool.perl#L224-L248 .

  • lindex 表示 LOCAL:包含当前分支上文件内容的临时文件。
  • rindex 代表 REMOTE:包含要 merge 的文件内容的临时文件。
  • wtindex 表示 MERGED(工作树):正在进行 merge 的结果

这些索引已更新 using --index-info为了便于区分您将对每个文件进行的任何区域设置修改以及上述三个版本。

关于git - git difftool 生成的 "lindex"、 "rindex"和 "wtindex"文件是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24558833/

相关文章:

linux - git在Windows和Linux之间切换后强制刷新索引

git - 索引有reflog吗?

git difftool -d 查看两个历史提交之间的差异

git - 二进制文件上的 git difftool 可能吗?如果是这样,如何配置它?

Git: git lfs 迁移后的 "The system cannot find the path specified."

git - Phabricator 钩子(Hook)和 Bitbucket

git - CocoaPods `pod install` 错误 : cannot open FETCH_HEAD: Permission denied

git - git索引中的 "stat information"是什么?

远程分支的暂存或未暂存更改之间的 Git diff

git 推送错误 : RPC failed; HTTP 500 curl 22 The requested URL returned error: 500