Best way to merge a git revision into a mercurial repository?

I have a git repository, which has changes that I am slowly bringing into a mercurial repository. (It’s a weird history, and I’m hand checking everything, and just as well that I am).

Currently, I’ve generating a diff using git diff, and merging it using patch. That had a few problems, so I switched hg import, which has problems of its own.

  • Git - Forking without Github
  • Does a bisect in version control benefit from using a rebaseif workflow?
  • Can GIT, Mercurial, SVN, or other version control tools work well when project tree has binary files?
  • Migrating away from Clearcase
  • Why should a business use distributed version control?
  • How to make sure my git repo code is safe?
  • What’s the best way of doing this?

    (What errors? The biggest culprits are lost hunks, and hunks that don’t merge and need to done manually. I get “bad end of line” occasionally, and patch sometimes reports that the git diff is corrupted.)

  • Git “discrepancy”: `git diff` does not take commit messages into consideration but SHA-1 generation takes commit messages while computing SHA-1
  • Diff between commits in Visual Studio 2015 using git
  • How can I see list of ignored files in git?
  • Merge Request approvals in GitLab CE
  • How to use Jenkins to push to Github on test success?
  • How can I delete files in the repository while keeping (and ignoring) them locally?
  • One Solution collect form web for “Best way to merge a git revision into a mercurial repository?”

    Have you tried using the hg-git extension? With it, you can pretty easily pull from a Git repo, thus converting a Git repo into a Mercurial repo in the process (and, if desired, you can also push back into the Git repo from hg).

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