I want a way to remove (really remove) a commit or a branch from a git repository, for nothing but to save space, i tried to use 'git branch -d branch-name' to remove a branch or 'git reset Head~ --hard' but both just remove or move the branch head, and still the commit exists, and i can reassign a branch head to any commit.
isn't there a way to do this without removing the entire repository folder and reinitialize?