This question already has an answer here:
I want to revert all my changes in a repository, so is it possible to delete all commits in Bitbucket? If so, how?
This question already has an answer here:
I want to revert all my changes in a repository, so is it possible to delete all commits in Bitbucket? If so, how?
I have no idea why you'd want to do something like this, but..
One way to do it would be to reset to your initial commit:
and then force push:
You're pretty much rewriting the entire history of whatever branch you're pushing to. Why not just create a new repository?
git reset --hard <commit>
Read more here: https://www.atlassian.com/git/tutorial/undoing-changes#!reset