I have some garbage commits in my git repositry. These have been created by e.g. the git gui when changing the latest commit again and accidently creating additional commits.
Now I have some commits lying around with no HEAD assigned (detached, not part of any branch).
As I want to tidy up, my question is: How can I delete these commits (see F, G and H)? Is this done using rebase or revert or reset? Or using another tool? On which commit do I have to sit to do it?
A -- B -- C -- D -- E [master]
\-- F -- G
\-- H
Thanks
Christian