git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: how to track changes of a file

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jun 16, 2008, 10:56 UTC
Message-ID
<485646F9.1030300@viscovery.net>
In-Reply-To
<48564499.3050008@gmail.com>
bill lam schrieb:
Show 7 quoted lines
> 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
Previous: bill lamNext: bill lam
Message 2 of 4 in “how to track changes of a file”
  1. bill lamJun 16, 2008
  2. Johannes SixtJun 16, 2008
  3. bill lamJun 16, 2008
  4. Johannes SixtJun 16, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.