Re: how to track changes of a file

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

 



bill lam schrieb:
> I want to see what had been done to a particular file, so I started with
> the log,
> 
> $ git-log --no-color glinvc03.ijs |grep commit |head -3
> commit 23335cf4acadb9f09410f106adbcc2b190fe9c70
> commit 31e4f2c519caa9afa2e29ed8ffb40deb62aa972f
> commit b515f020d05f2967a7283751c8dd3740de7136a4

All you neede here probably was just

$ git rev-list -3 -- glinvc03.ijs

> I want to know how to,
> 1. cat the content this file for these 3 versions

$ git show {23335c,31e4f2,b515f0}:glinvc03.ijs

> 2. show the differences between versions,

$ git log -p -2 -- glinvc03.ijs

> I use vim to view man page, and git-log without redirection will invoke
> vim as a man viewer.  Does git-log always use man?  Without the
> --no-color option there will be some "33m" prepending to some lines, is
> there any global setting to turn off color in git-log?

You have set PAGER=vim in your .profile? Then put

GIT_PAGER=less; export GIT_PAGER

there, too.

-- Hannes
--
To unsubscribe from this list: 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]

  Powered by Linux