[EMAIL PROTECTED] wrote:
> Is there an easy way to say "diff against the most recent commit that
> affected this file"? If I do git diff HEAD^ <file>, it diffs against
> the previous commit to the repository as a whole, but that commit may
> not have affected <file>. For example, I may commit to file changes to
> file X, commit changes to file Y, then commit changes to file Z. If I
> want to diff file X against the previous revision of file X, I'd have
> to do 'git diff HEAD~3' (or manually look through the log for the
> commit id), but that assumes I know that the previous commit that
> affected file X was 3 commits ago.

gitk src/parser.cpp will show all the commits that 'affected' src/parser.cpp

Of course you cal also use:
gitk v0.4.7.. src/parser.cpp
who shows all the commits that 'affected' src/parser.cpp since version 0.4.7

You can apply the same methodology to git log.

Regards,
-- 
                Luís Pereira

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to