git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: bill lam <cbill.lam@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: how to track changes of a file
Date: Mon, 16 Jun 2008 12:56:57 +0200	[thread overview]
Message-ID: <485646F9.1030300@viscovery.net> (raw)
In-Reply-To: <48564499.3050008@gmail.com>

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

  reply	other threads:[~2008-06-16 10:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-16 10:46 how to track changes of a file bill lam
2008-06-16 10:56 ` Johannes Sixt [this message]
2008-06-16 15:49   ` bill lam
2008-06-16 16:08     ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=485646F9.1030300@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=cbill.lam@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).