From: Ben Knoble <ben.knoble@gmail.com>
To: JAYATHEERTH K <jayatheerthkulkarni2005@gmail.com>
Cc: GIT Mailing-list <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: Question: regarding understanding code base
Date: Sat, 14 Jun 2025 20:26:15 -0400 [thread overview]
Message-ID: <AF617F39-7B22-44A3-BF08-D21CCFBEBD20@gmail.com> (raw)
In-Reply-To: <CA+rGoLf8Lf0gbPEUjTU9Zc9KQrzui4pjyvfxhA-LT4YuafqeOQ@mail.gmail.com>
> 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.”
>
> 1 - https://lore.kernel.org/git/xmqqfrh3qe2w.fsf@gitster.g/
>
>
> Thank you,
>
> - Jayatheerth
>
next prev parent reply other threads:[~2025-06-15 0:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-14 12:43 Question: regarding understanding code base JAYATHEERTH K
2025-06-14 15:43 ` Junio C Hamano
2025-06-15 0:24 ` JAYATHEERTH K
2025-06-15 0:43 ` Junio C Hamano
2025-06-15 0:48 ` JAYATHEERTH K
2025-06-16 0:40 ` Junio C Hamano
2025-06-16 9:44 ` JAYATHEERTH K
2025-06-15 0:26 ` Ben Knoble [this message]
2025-06-15 0:37 ` JAYATHEERTH K
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AF617F39-7B22-44A3-BF08-D21CCFBEBD20@gmail.com \
--to=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jayatheerthkulkarni2005@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox