Re: how to display file history?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, 15 May 2006, Brown, Len wrote:
>
> it is tiresome to access kernel.org/git tree display
> to see the list of commits that changed a particular file.
> (and for files on my local disk, this isn't available).
> 
> How do I print the list of commits that change a particular file
> on my local disk?

Just do

	git whatchanged -p <file>

which has worked pretty much since day one. In fact, it's much better than 
that. The "file" can be any abritrary combination of files and/or 
directories, and it will track them all at the same time. So

	git whatchanged -p arch/ia64 include/asm-ia64

will track the ia64-specific changes.

Newer git versions (ie 1.3.x+) support this in "git log" too (it worked on 
older gits, but it was unacceptably slow, so you might as well consider it 
"nonworking"). So

	git log [-p] <filespec>

is your friend.

Finally, as usual, "gitk" is just a fancier log viewer. So just do

	gitk arch/ia64 include/asm-ia64

and enjoy.

You really shouldn't go to gitweb. The history view of gitweb is much less 
capable than any local view.

		Linus
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]