Re: Question: regarding understanding code base
- From
JAYATHEERTH K <jayatheerthkulkarni2005@gmail.com>
- Date
- Jun 15, 2025, 00:37 UTC
- Message-ID
- <CA+rGoLcKfWYYSc-ORC9pCsUzsqketFdfVruwTC0Q06+BN5Gb7w@mail.gmail.com>
- In-Reply-To
- <AF617F39-7B22-44A3-BF08-D21CCFBEBD20@gmail.com>
On Sun, Jun 15, 2025 at 5:56 AM Ben Knoble <ben.knoble@gmail.com> wrote:
Show 20 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.” >
By _travel back to the latest ones_ I think I should have said travel _forward to the latest ones_
But I meant to incrementally get to the _latest commit_ from the _initial commit_