小编JRi*_*out的帖子

Git diff跨分支的不同目录

我想比较两个显着分歧的分支.我还想将我的比较限制在一个特定的子目录中,其中文件只在一个分支中移动.

示例布局:

branch-a
??? sub
    ??? file1
    ??? file2
    ??? file3
branch-b
??? file2
??? file3
??? file4
Run Code Online (Sandbox Code Playgroud)

运行git diff -M branch-b从分支正确的diff文件,但它包括了所有的变化,而不仅仅是那些在.我尝试过使用--relative,但这似乎阻止了移动检测.

git git-diff git-branch

10
推荐指数
1
解决办法
4756
查看次数

标签 统计

git ×1

git-branch ×1

git-diff ×1