Re: Why is reflog so obscure?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Thomas Guyot <tguyot@xxxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux