From: Junio C Hamano Date: Tue, 10 May 2016 18:14:06 GMT Subject: Re: is ORIG_HEAD allowed to point to a non-existing object? Message-ID: In-Reply-To: Christian Halstrick writes: > If I do a "git-rebase -i ..." followed by "git reflog expire ..." and > "git gc ..." then I can end up with a repo which has a ref ORIG_HEAD > which points to a non-existing object. > > - Is this intended? Yes. HEAD is a ref, but other things like MERGE_HEAD, ORIG_HEAD, FETCH_HEAD are not considered as refs and they are intended to be temporary. This does mean that they will become invalid if you prune objects that are only reachable from them, but your "reflog expire && gc" falls into "if it hurts, don't do it".