From: 𝕍𝕖𝕝𝕠𝕔𝕚𝕗𝕪𝕖𝕣 Date: Wed, 24 Sep 2025 17:11:35 GMT Subject: Re: 0-Based indexes for git log Message-ID: <771fc44e-32d4-4758-b497-bcef86433446@velocifyer.com> In-Reply-To: >> Day of month numbers are 1-based. > Correct. No, day of month numbers are 0-based. > There are a few things in Git that are 0 based, but not so many. > > * parent numbers are 1-based. HEAD~1 is the "previous commit", aka > "first parent". HEAD~0 is the HEAD itself. HEAD~1 just means HEAD - 1 commit.(AKA "reverse 0-based index") > * reflog entries are 1-based. @{1} is the "previous object pointed > by the current branch", @{2} is one before that. @{0} is the > current branch itself. No, that is just a reverse 0-based index. > * stash entries are counted 0-based. "git stash list" shows from > stash@{0} that is the most recently created stash entry. That is correct. It's a reverse 0-based index becuase it uses reflog syntax. -- George truly, 𝕍𝕖𝕝𝕠𝕔𝕚𝕗𝕪𝕖𝕣 This email does not constitute a legally binding contract