Let's say there are two branches a
and b
in a git repository.
At the tip of branch a there's foo.txt
:
111
aaa
bbb
ccc
while at the tip of branch b
same foo.txt
is like this:
aaa
bbb
ccc
222
Consider lines aaa
, bbb
and ccc
where introduced in three different commits, one per line for branch b. And same lines where introduced in a single commit for branch a. So the only difference which is displayed by git diff ab
is in line 111
and 222
.
Is there any simple way to display only commits responsible for actual diff between branches, while omitting commits respondible for aaa
, bbb
, ccc
?
You would need to use something like a tool I wrote for this kind of request called difflame
that joins information from diff and blame.
https://github.com/eantoranz/difflame
Let me know if it works for you.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.