Re: ghost refs
- From
Jeff King <peff@peff.net>
- Date
- Apr 7, 2010, 21:00 UTC
- Message-ID
- <20100407210010.GB27012@coredump.intra.peff.net>
- In-Reply-To
- <r2h32541b131004070958pa66bb7a3g6a1ecfaea0419965@mail.gmail.com>
On Wed, Apr 07, 2010 at 12:58:33PM -0400, Avery Pennarun wrote:
Show 6 quoted lines
> This is on purpose, based on the theory that you don't want to lose > data from your local repo just because someone (accidentally?) deletes > a branch on the remote server. Unfortunately, this theory is a bit > flawed, since someone could just as easily overwrite the remote branch > with a totally different commit, and you'd still lose it in *that* > case. So mostly it's just confusing.
You do have a reflog in the case of overwrite. Delete kills off any associated reflog (it would be cool if we had a "graveyard" reflog that kept deleted branch reflogs around for a while).
> Anyway, what you want is "git remote prune origin".
Yep. I think there is "git fetch --prune" these days, too. We could perhaps add a config option if there isn't one already (I didn't look) so this happens automatically.
-Peff