# Showing the version of a file that's in the Index.

7 messages from 2009-04-07 to 2009-04-08. Participants: Tim Visher, Markus Heidelberg, Teemu Likonen, Johannes Schindelin.
Thread: https://gitlist.dev/t/18769

## Tim Visher, 2009-04-07 19:59

Subject: Showing the version of a file that's in the Index.
Message-ID: <c115fd3c0904071259y53b4b264u9c9957b68e36cc44@mail.gmail.com>
URL: https://gitlist.dev/e/c115fd3c0904071259y53b4b264u9c9957b68e36cc44%40mail.gmail.com

```
Hello Everyone,

How do you go about showing the version of the file that's in an
index.  I'm currently going through a somewhat convoluted in-file
add/commit process and I'd like to verify that what I'm about to
commit is in fact the version that I want to commit.

Thanks in advance!

-- 

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail

```

## Markus Heidelberg, 2009-04-07 20:10

Subject: Re: Showing the version of a file that's in the Index.
Message-ID: <200904072210.05591.markus.heidelberg@web.de>
URL: https://gitlist.dev/e/200904072210.05591.markus.heidelberg%40web.de
In-Reply-To: <c115fd3c0904071259y53b4b264u9c9957b68e36cc44@mail.gmail.com>

```
Tim Visher, 07.04.2009:
> How do you go about showing the version of the file that's in an
> index.

With version do you mean content? Then

    git cat-file -p :0:file
or
    git cat-file -p :file

See git-rev-parse(1) "Specifying revisions", the last item.

Markus

```

## Teemu Likonen, 2009-04-07 20:14

Subject: Re: Showing the version of a file that's in the Index.
Message-ID: <874ox0w7ak.fsf@iki.fi>
URL: https://gitlist.dev/e/874ox0w7ak.fsf%40iki.fi
In-Reply-To: <200904072210.05591.markus.heidelberg@web.de>

```
On 2009-04-07 22:10 (+0200), Markus Heidelberg wrote:

> Tim Visher, 07.04.2009:
>> How do you go about showing the version of the file that's in an
>> index.
>
> With version do you mean content? Then
>
>     git cat-file -p :0:file
> or
>     git cat-file -p :file

Or

    git show :file

```

## Tim Visher, 2009-04-07 20:15

Subject: Re: Showing the version of a file that's in the Index.
Message-ID: <c115fd3c0904071315s6cb8812ajcdc98357f9750716@mail.gmail.com>
URL: https://gitlist.dev/e/c115fd3c0904071315s6cb8812ajcdc98357f9750716%40mail.gmail.com
In-Reply-To: <874ox0w7ak.fsf@iki.fi>

```
On Tue, Apr 7, 2009 at 4:14 PM, Teemu Likonen <tlikonen@iki.fi> wrote:
> On 2009-04-07 22:10 (+0200), Markus Heidelberg wrote:
>
>> Tim Visher, 07.04.2009:
>>> How do you go about showing the version of the file that's in an
>>> index.
>>
>> With version do you mean content? Then
>>
>>     git cat-file -p :0:file
>> or
>>     git cat-file -p :file
>
> Or
>
>    git show :file
>

Nice.  Thank you!

-- 

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail

```

## Markus Heidelberg, 2009-04-07 21:57

Subject: Re: Showing the version of a file that's in the Index.
Message-ID: <200904072357.47881.markus.heidelberg@web.de>
URL: https://gitlist.dev/e/200904072357.47881.markus.heidelberg%40web.de
In-Reply-To: <874ox0w7ak.fsf@iki.fi>

```
Teemu Likonen, 07.04.2009:
> Or
> 
>     git show :file

Huh, I use git-show daily for commits, but I completely forgot about it
for files when replying. I already felt strange about having to pass an
option.

```

## Teemu Likonen, 2009-04-08 05:00

Subject: Re: Showing the version of a file that's in the Index.
Message-ID: <87y6ubvix7.fsf@iki.fi>
URL: https://gitlist.dev/e/87y6ubvix7.fsf%40iki.fi
In-Reply-To: <200904072357.47881.markus.heidelberg@web.de>

```
On 2009-04-07 23:57 (+0200), Markus Heidelberg wrote:

> Teemu Likonen, 07.04.2009:
>> Or
>> 
>>     git show :file
>
> Huh, I use git-show daily for commits, but I completely forgot about it
> for files when replying.

It's nice for trees too:

    git show HEAD~3:
    git show master~1:directory/

```

## Johannes Schindelin, 2009-04-08 11:04

Subject: Re: Showing the version of a file that's in the Index.
Message-ID: <alpine.DEB.1.00.0904081303400.9157@intel-tinevez-2-302>
URL: https://gitlist.dev/e/alpine.DEB.1.00.0904081303400.9157%40intel-tinevez-2-302
In-Reply-To: <87y6ubvix7.fsf@iki.fi>

```
Hi,

On Wed, 8 Apr 2009, Teemu Likonen wrote:

> On 2009-04-07 23:57 (+0200), Markus Heidelberg wrote:
> 
> > Teemu Likonen, 07.04.2009:
> >> Or
> >> 
> >>     git show :file
> >
> > Huh, I use git-show daily for commits, but I completely forgot about it
> > for files when replying.
> 
> It's nice for trees too:
> 
>     git show HEAD~3:
>     git show master~1:directory/

But that's not in the index, and my patch to show cache-trees was 
rejected.

Ciao,
Dscho

```
