Re:High-Level Problems with Git and How to Fix Them
by mschaef on Tuesday December 12, 2017 @01:36PM
(#15908154)
> I'm not shy about recursively copying the entire repository on disk
Agreed.
> Also, once you understand how to pull things out of the reflog,
That, and I'll also dump a git log of the last couple dozen commits into an editor buffer so that I can hang onto the commit ids. Until a GC cycle occurs, you don't lose the commits even if they aren't reachable through normal paths.
Re:High-Level Problems with Git and How to Fix Them
by theptip on Tuesday December 12, 2017 @05:03PM
(#15909933)
`git reflog` gives you the historical list of SHAs that you've pointed HEAD at; even if you destroy your branch with a rebase, you can still see what commit your branch pointed to before you started the operation.
Re:High-Level Problems with Git and How to Fix Them
by mschaef on Wednesday December 13, 2017 @10:41AM
(#15914896)
Yeah... I just find the printed log output a bit easier to read (at least for the few times I need to do this sort of thing). '@' syntax falls into that same basic category - powerful, the better solution, but nothing I use enough to bother mastering.
Personally, I'm not shy about recursively copying the entire repository on disk to run potentially destructive experiments in a duplicated environment.
Also, once you understand how to pull things out of the reflog, it's usually not hard to restore to a sane state.