Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 3
    The push kept failing for me on the push with error "dulwich.errors.RefFormatError: refs/heads/ref". It turns out that I had several bookmarks. After deleting each bookmark, it stopped failing. Commented Jun 30, 2016 at 0:25
  • 11
    Per the hg-git documentation, "TortoiseHg comes with hg-git" and just needs to be enabled (as shown above). However, it is not included with the command line version of mercurial (It can be installed if desired). If you have both TortoiseHg & HG installed, you need to be sure the hg.exe from TortoiseHg is used, and not the one form the command line installation. If you get the error No module named hggit, try fully qualifying the hg command: "C:\Program Files\TortoiseHg\hg" push c:/path/to/your/git/rep Commented Aug 28, 2016 at 14:23
  • 3
    Note that this method only seems to import the currently checked-out branch (I'm looking for a solution that will import the whole repository). Commented Apr 4, 2017 at 9:06
  • 14
    Wouldn't hg bookmark -r default master be better than hg bookmarks hg? Commented Nov 1, 2017 at 14:01
  • 7
    For the files to appear in the repo, do: git checkout hg Commented Aug 29, 2019 at 13:15