How to delete all commits in Bitbucket

This question already has an answer here:

  • Delete or remove all history, commits, and branches from a remote Git repo?

    2 answers

  • how to update local repo if some one has made change in master repo?
  • Cloning from BitBucket to GIT without login?
  • Hudson/Jenkins — how to access a private git repository on BitBucket.com
  • git pull request: resolve a merge conflict properly?
  • Git Push Unable to Create Directory Error
  • Xcode/Git Repository Error: “Please verify that the working copy is reachable and try again.”
  • What does git log --all do?
  • How to use git over custom ssh software?
  • VisualStudio doesn't create .gitignore and .gitattributes when adding an existing solution to a repository
  • Gitorious Rots Ruby on Rails Error
  • Git tags referring to different refs on local and remote
  • Is it possible to setup an accessible Git Staging Directory?
  • 2 Solutions collect form web for “How to delete all commits in Bitbucket”

    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:

    git reset --hard (find the sha1 of your first commit)
    

    and then force push:

    git push -f
    

    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

    Git Baby is a git and github fan, let's start git clone.