# How to find a commit containing a given sha1

2 messages from 2007-12-30 to 2007-12-30. Participants: Ping Yin, Johannes Schindelin.
Thread: https://gitlist.dev/t/11426

## Ping Yin, 2007-12-30 10:39

Subject: How to find a commit containing a given sha1
Message-ID: <46dff0320712300239m54ab8280w9c1ec6347f095b40@mail.gmail.com>
URL: https://gitlist.dev/e/46dff0320712300239m54ab8280w9c1ec6347f095b40%40mail.gmail.com
In-Reply-To: <46dff0320712300238p67e82c66r5bf49900dd21aefa@mail.gmail.com>

```
Given a blob sha1, is there a simple way to find which file it
corresponds to and which commit it is contained?

-- 
Ping Yin

```

## Johannes Schindelin, 2007-12-30 10:56

Subject: Re: How to find a commit containing a given sha1
Message-ID: <Pine.LNX.4.64.0712301153361.14355@wbgn129.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0712301153361.14355%40wbgn129.biozentrum.uni-wuerzburg.de
In-Reply-To: <46dff0320712300239m54ab8280w9c1ec6347f095b40@mail.gmail.com>

```
Hi,

On Sun, 30 Dec 2007, Ping Yin wrote:

> Given a blob sha1, is there a simple way to find which file it 
> corresponds to and which commit it is contained?

Yes.  "git log --raw --abbrev=40 --all" and then search for the blob name 
(SHA-1).

Hth,
Dscho

```
