Re: About detached heads

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

 



On 3/15/08, Nicolas Pitre <nico@xxxxxxx> wrote:
> ...
>
>         git reset --hard HEAD@{yesterday.at.4pm}
>
>  and it'll magically bring you back to the state you were yesterday at
>  4pm.  You need the 6pm state instead?  No problem: just ask for
>  yesterday.at.6pm then.
>
>  And before doing the 'reset --hard', you might want to do a simple
>  'checkout' beforehand so you can be sure it actually corresponds to what
>  you want:
>
>         git checkout HEAD@{yesterday.at.4pm}
>         [compile, test, whatever]
>         git checkout HEAD@{yesterday.at.6pm}
>         [compile, test, whatever]
>
>  and when OK with it, then:
>
>         # return to your master branch (or any other branch)
>         git checkout master
>         # then reset it to the desired state
>         git reset --hard HEAD@{yesterday.at.6pm}
>
>
>
>  Nicolas

More useful advice ... many thanks.

Cheers,
Geoff.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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