I need a commit to no longer be in the git database of commits. I need to be able to remove commit abc123...
such that git checkout abc123...
returns error: pathspec 'abc123...' did not match any file(s) known to git.
The QA Delete commits from a branch in Git answers this partially, as in how to remove references to a commit from the HEAD, but it doesn't cover finding all of the branches a commit is present in nor does it cover expiring and purging the commit once it has been made a dangling commit.
How would I achieve this?