From: Sergey Organov <sorganov@gmail•com>
To: Junio C Hamano <gitster@pobox•com>
Cc: Thomas Guyot <tguyot@gmail•com>, Jeff King <peff@peff•net>,
Gerriko io <gerriko.iot@gmail•com>,
git@vger•kernel.org
Subject: Re: Why is reflog so obscure?
Date: Tue, 12 Jul 2022 18:18:27 +0300 [thread overview]
Message-ID: <87ilo2we9o.fsf@osv.gnss.ru> (raw)
In-Reply-To: <xmqqo7xuif46.fsf@gitster.g> (Junio C. Hamano's message of "Tue, 12 Jul 2022 07:23:53 -0700")
Junio C Hamano <gitster@pobox•com> writes:
> Thomas Guyot <tguyot@gmail•com> writes:
>
>> Thanks for clarifying that - I suspected it since we can do
>> <branch>@{<date>} although I didn't find any reference branch reflogs
>> in the documentation. I could've missed it... Is there a way to read a
>> branch reflog?
>
> $ git reflog ;# lists entries of reflog of HEAD, starting at HEAD@{0}
> $ git reflog HEAD ;# same
> $ git reflog HEAD@{4} ;# same, starting at HEAD@{4}
> $ git reflog master ;# entries of reflog of "master"
> $ git reflog master@{0} ;# same
> $ git reflog master@{now} ;# same, show with timestamps
> $ git reflog master@{4.minutes} ;# same, starting at master@{4.minutes}
>
> For the branch that is currently checked out, you can omit the name
> when you use any of the @{...} notation, so
>
> $ git reflog @{0}
> $ git reflog @{now}
>
> are often the easiest ways to view what you did on the current
> branch.
Very handy, thanks! Would be nice to have this in EXAMPLES section of
corresponding manual page.
Honestly, I tried (admittedly not very hard) to figure how to get dates
from "git reflog" a few times, but every time I gave up, so this (along
with the --dates option turning dates output on) is not very
discoverable.
--
Sergey Organov
next prev parent reply other threads:[~2022-07-12 15:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 21:02 Why is reflog so obscure? Gerriko io
2022-07-11 22:55 ` Thomas Guyot
2022-07-12 7:12 ` Jeff King
2022-07-12 9:22 ` Thomas Guyot
2022-07-12 14:23 ` Junio C Hamano
2022-07-12 15:18 ` Sergey Organov [this message]
2022-07-12 15:50 ` Junio C Hamano
2022-07-14 0:03 ` Thomas Guyot
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=87ilo2we9o.fsf@osv.gnss.ru \
--to=sorganov@gmail$(echo .)com \
--cc=gerriko.iot@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=peff@peff$(echo .)net \
--cc=tguyot@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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