How to permanently delete a commit from a removed branch so that it becomes unreachable?
* aa448ae (orphan)
| * 1c0c419 (HEAD -> master)
|/
* 0bfa9c3
git branch -D orphan
git gc --prune=all
git filter-branch
And it's still available when I do:
git show aa44
or:
git branch test aa44
To remove all dangling commits and those reachable from the reflogs:
git reflog expire --expire-unreachable=now --all
git gc --prune=now
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With