cleaning out a Mercurial Repository

There are a bunch of file in the history of my hg repo that have been removed. They are causing the repo to get pretty big (several of them are images, and sql dumps from early in the project, among other things that never should have been comitted in the first place).

How do I get mercurial to forget about that stuff and get my repository down to a reasonable size again?

  • Adding a Git subrepository to Mercurial
  • git equivalent of 'hg share'?
  • How to correctly close a feature branch in Mercurial?
  • Git merge 2 versions no common ancestor
  • how to see files in repository before running 'update'
  • Automatic versioning of sources for local backup
  • Should I just make a copy of the files (and the .hgignore) and make a new repo, while archiving the old one for future reference?

  • SVN: how to merge tags from separate projects
  • best way to version multiple different files
  • Git: Removing carriage returns from source-controlled files
  • How to link a new folder to git repository
  • Git branch name - case sensitive or insensitive?
  • Show the log for a different branch
  • One Solution collect form web for “cleaning out a Mercurial Repository”

    See:

    $ hg convert --help
    

    $ hg convert --filemap fmap old new
    

    where file fmap contains something like:

    exclude path/to/file/to/purge
    

    (src: https://www.mercurial-scm.org/pipermail/mercurial/2008-August/020721.html)

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