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

Re: Question: regarding understanding code base

From
Ben Knoble <ben.knoble@gmail.com>
Date
Jun 15, 2025, 00:26 UTC
Message-ID
<AF617F39-7B22-44A3-BF08-D21CCFBEBD20@gmail.com>
In-Reply-To
<CA+rGoLf8Lf0gbPEUjTU9Zc9KQrzui4pjyvfxhA-LT4YuafqeOQ@mail.gmail.com>
Show 11 quoted lines
> Le 14 juin 2025 à 08:44, JAYATHEERTH K <jayatheerthkulkarni2005@gmail.com> a écrit :
> 
> Ok so a couple of weeks ago, in this thread[1]
> Junio advised that one of the best ways to understand git is to go back to the
> _inital commit_ and travel back to the latest ones.
> 
> And I happened to quite like this idea, cause I still have to dig up a
> lot of things in git.
> The main question is
> What are the best and smallest set of git commands to do this as
> I can set this up as an alias and use this trick for many other projects too.
If you want a checkout of the root commit, assuming there’s only one, something like
    git rev-list | sed -n \$p | xargs git switch --detach
ought to work. You could feed something similar to git-worktree. But it’s a little harder to “go forward” with Git’s data model, and I didn’t totally understand “travel back to the latest ones.”
Show 8 quoted lines
> 
> 1 - https://lore.kernel.org/git/xmqqfrh3qe2w.fsf@gitster.g/
> 
> 
> Thank you,
> 
> - Jayatheerth
> 
Previous: JAYATHEERTH KNext: JAYATHEERTH K
Message 8 of 9 in “Question: regarding understanding code base”
  1. JAYATHEERTH KJun 14, 2025
  2. Junio C HamanoJun 14, 2025
  3. JAYATHEERTH KJun 15, 2025
  4. Junio C HamanoJun 15, 2025
  5. JAYATHEERTH KJun 15, 2025
  6. Junio C HamanoJun 16, 2025
  7. JAYATHEERTH KJun 16, 2025
  8. Ben KnobleJun 15, 2025
  9. JAYATHEERTH KJun 15, 2025

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.