Hi, I am trying to visually show a file change history.
 I have a file, named hello.txt, and 3 commits on it, they are:

_ 1b0e691e55caa8fd2b5dd6902f77c406fb68e648__
__ d058c095f7e98a7ebe943c18f87ef087c723bb9f__
__ c4d1769183ab6d852c624e71e6a0ca00dc3b6d13__
 Please note: they might not be continuous.
 The way to find all the commits on this file is by following command:
_git log --follow hello.txt|awk '/commit/{print $2}'_
Now, I want to show every visual diff of the 3, against their respective parent.
 Let's take 1b0e691e55caa8fd2b5dd6902f77c406fb68e648 as example:
The following command will give me a view on the commit details on this file, and since I have configured kdiff3 as the difftool, so it will pop up a kdiff3 windows to display the differences.
_ git difftool 1b0e691e55caa8fd2b5dd6902f77c406fb68e648^! hello.txt_
So, I continue to use a while loop to try to see all the 3 commits diff view _ git log --follow hello.txt|awk '/commit/{print $2}'|while read ss; do git difftool $ss^! hello.txt; done_

 But, when I run my script , only these two commits are displayed,

_ 1b0e691e55caa8fd2b5dd6902f77c406fb68e648__
__ c4d1769183ab6d852c624e71e6a0ca00dc3b6d13__
 this middle one

_ d058c095f7e98a7ebe943c18f87ef087c723bb9f_

 is somehow skipped, I guess it is because the ^! operator.
But really, I don't know why the middle commit is skipped, and could someone help me to find out why my script not work? My intention is just to show the file change history in a visual tool, for example my favorite one: kdiff3,
 Or any alternative solution would also be greatly appreciated.

On 7/28/15 11:25 AM, Konstantin Khomoutov wrote:
On Tue, 28 Jul 2015 10:10:40 -0700 (PDT)
颖黄 <huangyi...@gmail.com> wrote:

       Hi, I am trying to visually show a file change history.
       An easy way to do is to use gitk <file>, while it is in text
   My intention is just to show the file change history in a visual
tool, for exampel my favorite one: kdiff3,
   any alternative solution/help would be greatly appreciated.
The problem with your question is that you presented a solution without
clearly explaining your objective.

Could you please explain in simple words what are you trying to achieve?
I mean, like in
1) I have a commit-ish.  Let's call it "abc123".
2) Given it, I'd like to have kdiff3 popped up displaying difference
    between such and such commits.
3) ...

In the meantime, does `git log --patch --follow -- path/to/file`
do what you want (in text mode)?

After doing `git config --global core.ui auto` diffs rendered in the
console look no less understandable than those presented by a graphical
tool IMO.  Well, unless you have insanely long lines in your files
while having small terminal window.

Best Regards,


You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to