[dmd-internals] Fixing github pull requests that I borked up

Leandro Lucarella luca at llucax.com.ar
Fri Oct 11 02:49:39 PDT 2013


Jonathan M Davis, el  9 de October a las 14:20 me escribiste:
> On Wednesday, October 09, 2013 19:48:48 David Nadlinger wrote:
> > On Mon, Oct 7, 2013 at 9:44 PM, Walter Bright <walter at digitalmars.com> 
> wrote:
> > > Git, miserable program that it is, has no:
> > > git undo
> > 
> > Actually it does, sort of, but only for local changes: There is "git
> > reflog", which lists all the different locations your HEAD pointed to,
> > and "git reset --hard HEAD@{1}" resets your branch to where it pointed
> > before the last operation.
> > 
> > This is more of a handy trick if you know what you are doing than a
> > fail-safe undo feature though.
> 
> Though to be honest, I don't think that anyone should be messing around with 
> resets (especially hard resets) without fully understanding what they're 
> doing. git reset is a very handy feature to be sure, but it also makes it very 
> easy to lose commits if you're not careful.

You never really lose commits until the GC runs, which by default
I think it doesn't remove anything newer than 90 days. So that's what
reflog is good for, finding commits you missed some way or another, but
are still present in the git object database.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
22% of the time a pizza will arrive faster than an ambulance in
Great-Britain


More information about the dmd-internals mailing list