Re: Why is reflog so obscure?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 12, 2022, 14:23 UTC
- Message-ID
- <xmqqo7xuif46.fsf@gitster.g>
- In-Reply-To
- <a8d2a61d-b86f-9b89-6391-36c58c390a12@gmail.com>
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.