I have an automated process that creates a temporary commit and stash, does some stuff, and then pops the stash and reverts the commit.
After doing this a few times, the automated git gc
complains that there is too much stuff for it to clean up, so I'd like this process to tidy up after itself.
I don't however want to completely wipe out any other orphaned commits or stashes that might be in the repository, so git prune
and git gc --prune=now
will be more destructive than I want.
Is there a way to specifically delete one commit or stash that is no longer accessible?