Convert Mercurial project to Git [duplicate]

You can try using fast-export: cd ~ git clone https://github.com/frej/fast-export.git git init git_repo cd git_repo ~/fast-export/hg-fast-export.sh -r /path/to/old/mercurial_repo git checkout HEAD Also have a look at this SO question. If you’re using Mercurial version below 4.6, adrihanu got your back: As he stated in his comment: “In case you use Mercurial < 4.6 and you … Read more

Mercurial Remove History

There is no simple / recommended way of doing this directly to an existing repository. You can however “convert” your mercurial repo to a new mercurial repo and choose a revision from where to include the history onwards via the convert.hg.startrev option hg convert –config convert.hg.startrev=1234 <source-repository> <new-repository-name> The new repo will contain everything from … Read more

how to ignore files in kiln/mercurial using tortoise hg “that are part of the repository”

I always use a combination of .hgignore and BeforeBuild (in the .csproj file) for things like this. In one of my pet projects, I have the following setup: App.config contains my real hardcoded user id and password for testing. App.config.example is identical, but with fake data like “dummy_user” and “dummy_pw”. App.config is not part of … Read more

With Mercurial, how can I “compress” a series of changesets into one before pushing?

The histedit extension is exactly what you are looking for. hg histedit -o or hg histedit –outgoing will bring up a list of the outgoing changesets. From the list you can Fold 2 or more changesets creating one single changeset Drop changesets removing them from the history Reorder changesets however you like. histedit will prompt … Read more