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

Re: how can we git out source code base on git log?

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Mar 8, 2011, 08:22 UTC
Message-ID
<vpq8vwqvx65.fsf@bauges.imag.fr>
In-Reply-To
<AANLkTimAPBoHJX0iZOt949xQ8HeGPXRyKfD4CDNJFv7u@mail.gmail.com>
loody <miloody@gmail.com> writes:
> Is it possible I can check out the commit as
> 3831530dcb7b71329c272ccd6181f8038b6a6dd0,?

In complement to Jeff's answer: you can also get the content of a specific file without checking out with

  git show 3831530dcb7b713:path/to/file
Show 7 quoted lines
> commit 3831530dcb7b71329c272ccd6181f8038b6a6dd0
> Author: Mikhail Zolotaryov <lebon@lebon.org.ua>
> Date:   Wed Sep 8 17:06:03 2010 +0300
> .......
> .......
>
> Tag: aabb
  git log --decorate

does this (except that tags appear after the commit ID, not after the log message). You may also want to look at gitk.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Jeff King
Message 3 of 3 in “how can we git out source code base on git log?”
  1. loodyMar 7, 2011
  2. Jeff KingMar 7, 2011
  3. Matthieu MoyMar 8, 2011

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.