Matthieu Moy wrote:
Andreas Ericsson <ae@xxxxxx> writes:
However, just now I made a doodoo and need to recover a lost branch-head,
so git lost-found to the rescue. Or so I thought... It turns out that since
I've packed the unreachable refs, they haven't been pruned, and I can't
for the life of me figure out how to get rid of them.
Most likely they are still pointed to by the reflog. By default,
git-gc will expire the reflog after 90 days, and these reference will
then actually be pruned.
Oh gawds, I had forgotten about that one. Thanks :)
I probably shouldn't hold company git classes on live repos either, as that's
where the bazillion lost heads came from. Ah well, it's good to have a tool
where one is confident enough to trust production data for tool experimentation :)
That's really usefull to allow you to recover your work with "git
checkout HEAD@{whatever}" even after a mistake and a git-gc, but you
pay it in terms of disk-space. One alternative is to expire your
reflog explicitely.
Agreed. I had just forgotten about it as I've never had to use it before.
--
Andreas Ericsson andreas.ericsson@xxxxxx
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
-
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