> From: dexter ietf <dexter.i...@gmail.com>

> git log lists all the commits, how about if just want to see most recent 
> commit
> or most recent 2 commits on a file and per line basis.
> can we achieve the same with 'git diff', because this will help me view the 
> diff
> from vimdiff. with git log i can't achieve that. 


$ git log -1 -p filename

"-n" limits git-log to the last n commits.

git-blame is useful for annotating a file regarding which commit last
affected each line.

If you want to diff the versions of a file between the previous commit
and the current commit, you want

$ git diff HEAD^ HEAD -- filename

If you're interesting in diff'ing, you should read *all* of the
git-diff manual page.  What you want is probably in there somewhere.


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