In my local repo, sometimes there are tags tagging a commit with no children and no branch name.
I originally created these by branching off my main development line normally, setting a tag, and then deleting the branch. They don't get garbage-collected because the tag holds the line open.
Is there a command that will identify all such commits? It doesn't matter whether or not this command also finds the branch heads as I can identify them easily enough with git show-ref --heads.
I'd like to clean them up (either remove the tags and GC the line I don't need any more; or set a branch there which I believe is better practice).