是否可以在 git 中区分 lfs 文件?
Is it possible to diff lfs files in git?
当我查看 lfs 文件的差异时,我只看到 oid 和大小的差异。有没有办法轻松区分实际文件内容?
给定 2 个修订版和文件名,您可以使用脚本来区分文件。 https://github.com/git-lfs/git-lfs/issues/2498
Another option if you want to have diffs is to run git config diff.lfs.textconv cat
, which will have any files with the diff=lfs
attribute automatically rendered through Git to show the LFS file instead of the pointer.
Sourcetree GUI 示例:
我的 diff 是这样的:
在运行命令之后,它看起来像这样:
(您可能需要重新打开 Sourcetree 才能应用更改。)
当我查看 lfs 文件的差异时,我只看到 oid 和大小的差异。有没有办法轻松区分实际文件内容?
给定 2 个修订版和文件名,您可以使用脚本来区分文件。 https://github.com/git-lfs/git-lfs/issues/2498
Another option if you want to have diffs is to run
git config diff.lfs.textconv cat
, which will have any files with thediff=lfs
attribute automatically rendered through Git to show the LFS file instead of the pointer.
Sourcetree GUI 示例:
我的 diff 是这样的:
在运行命令之后,它看起来像这样:
(您可能需要重新打开 Sourcetree 才能应用更改。)