6 ms·
> I don't think it's as appreciated that git's complexity generally discourages people from trying things out. Personally, I'm not shy about recursively copyin
by AlexCoventry 9y ago
> I don't think it's as appreciated that git's complexity generally discourages people from trying things out.
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.
- mschaef 9y ago> 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.
- theptip 9y ago`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.
- mschaef 9y agoYeah... 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.