From: Junio C Hamano Date: Wed, 14 Aug 2013 01:44:08 GMT Subject: Re: ephemeral-branches instead of detached-head? Message-ID: <7vmwolujvb.fsf@alter.siamese.dyndns.org> In-Reply-To: <520AC9A8.4030104@gmail.com> Sitaram Chamarty writes: > # all reflog entries that are not on a branch, tag, or remote > d1 = !gitk --date-order $(git log -g --pretty=%H) --not --branches --tags --remotes > # all dangling commits not on a branch, tag, or remote > d2 = !gitk --date-order $(git fsck | grep "dangling.commit" | cut -f3 -d' ') --not --branches --tags --remotes > > (Apologies if something like this was already said; I was not following > the discussion closely enough to notice) Yup. A potential problem is that the output from "log -g --pretty=%H" or "fsck | grep dangling" may turn out to be humongous. Other than that, they correctly compute what you want.