【发布时间】:2018-12-17 14:54:19
【问题描述】:
我想知道我在 BranchA 上的所有代码更改是否已在 BranchB 上应用,无论提交 ID 是否相同或 BranchB 是否有大量额外更改
这可能吗?
例子:
Branch A : Commit 111... -> Add line 23
Commit 222... -> Add line 24
Branch B: Commit 333... -> Add line 23
Commit 444... -> Add line 24
Commit 555... -> Remove line 24
Commit 666... -> Add line 25
Commit 777... -> Add line 26
What I basically would like to know is whether the two changes from Branch A are already applied by other commits on Branch B.
In this case, the output I would like to see is:
- Add line 24
Why? Because this is the only change from Branch A not matching latest state of Branch B. I want to discard extra staff exclusive in Branch B (commits 666 and 777). I also want to consider latest state of Branch B, so even Branch B added at some point line 24, the latest state is removed, so that is the only differing change in regards to Branch A
当使用比较和差异时,我通常会看到分支 B 的所有额外员工,我不感兴趣,因为我只想知道分支 A 上下文中的差异
【问题讨论】: