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

Re: Question: regarding understanding code base

From
JAYATHEERTH K <jayatheerthkulkarni2005@gmail.com>
Date
Jun 15, 2025, 00:24 UTC
Message-ID
<CA+rGoLehMUWPMBrZ1hOk-GBQBCvSY0_ivFCn1w1C-V_bGTDgZg@mail.gmail.com>
In-Reply-To
<xmqq8qlu72hz.fsf@gitster.g>
On Sat, Jun 14, 2025 at 9:13 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 12 quoted lines
>
> JAYATHEERTH K <jayatheerthkulkarni2005@gmail.com> writes:
>
> > 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.
>
> Sorry, but I have no idea what you are trying to refer to as "this"
> in "commands to do this" and also "this" in "use this trick", so I
> cannot help you here.
>
>

What I meant was: You previously suggested that one good way to understand Git is to start from the initial commit of the Git repo and move forward chronologically through the commits.

I'd like to turn this approach into a repeatable workflow, possibly through an alias or small script.

So my question is: What is the smallest and most effective set of Git commands to:

- Start from the initial commit of a repository
- Walk forward through history (one commit at a time) probably which
changes my file system (I currently use a terminal based command)
I use
git rev-list --reverse HEAD | while read commit; do
  echo "=== Commit: $commit ==="
  git show --color --stat --patch --pretty=fuller "$commit"
  read -p "Press enter to continue to the next commit..."
done
I wanted to know if there are any better ways
Thanks again,
- Jayatheerth
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 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.