Convert Mercurial project to Git

Convert Mercurial project to Git - from bitbucket to gitlab

This post describe the steps for converting hg (mercurial) repository (on bitbucket) to git repository with all history.

  1. cd ~
  2. Clone your Mercurial repository you want to convert
  3. Clone the convert tool : git clone https://github.com/frej/fast-export.git
  4. git init new-git-repo
  5. cd new_git_rep
  6. Run the convert tool: ~/fast-export/hg-fast-export.sh -r /path/to/old/mercurial-repo
  7. git checkout HEAD
  8. In gitlab create new project which will contain the new-git-repo
  9. Add the remote which you just created step before and push:
    • git remote add origin url-to-new-repo-in-gitlab
    • git push -u origin –all
    • git push -u origin –tags

Thank you for your interest!

We will contact you as soon as possible.

Want to Know More?

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com
Thank you for your interest!

We will contact you as soon as possible.

Let's talk

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com