6 git-remote-hg - bidirectional bridge between Git and Mercurial
12 'git clone' hg::<hg repository>
18 This tool allows you to transparently clone, fetch and push to and from Mercurial
19 repositories as if they were Git ones.
21 To use it you simply need to use the "'hg::'" prefix when specifying a remote URL
28 $ git clone hg::http://selenic.com/repo/hello
35 If you want to see Mercurial revisions as Git commit notes:
37 --------------------------------------
38 % git config core.notesRef refs/notes/hg
39 --------------------------------------
41 If you are not interested in Mercurial permanent and global branches (aka. commit labels):
43 --------------------------------------
44 % git config --global remote-hg.track-branches false
45 --------------------------------------
47 With this configuration, the 'branches/foo' refs won't appear.
49 If you want the equivalent of `hg clone --insecure`:
51 --------------------------------------
52 % git config --global remote-hg.insecure true
53 --------------------------------------
55 If you want 'git-remote-hg' to be compatible with 'hg-git', and generate exactly the same commits:
57 --------------------------------------
58 % git config --global remote-hg.hg-git-compat true
59 --------------------------------------
64 Remember to run `git gc --aggressive` after cloning a repository, specially if
65 it's a big one. Otherwise lots of space will be wasted.
67 The oldest version of Mercurial supported is 1.9. For the most part 1.8 works,
68 but you might experience some issues.
73 To push a Mercurial named branch, you need to use the "branches/" prefix:
75 --------------------------------------
76 % git checkout branches/next
78 % git push origin branches/next
79 --------------------------------------
81 All the pushed commits will receive the "next" Mercurial named branch.
83 *Note*: Make sure you don't have +remote-hg.track-branches+ disabled.
88 The simplest way is to specify the user and password in the URL:
90 --------------------------------------
91 git clone hg::https://user:password@bitbucket.org/user/repo
92 --------------------------------------
94 You can also use the http://mercurial.selenic.com/wiki/SchemesExtension[schemes extension]:
96 --------------------------------------
98 bb.prefix = https://bitbucket.org/user/
100 bb.password = password
101 --------------------------------------
103 Finally, you can also use the
104 https://pypi.python.org/pypi/mercurial_keyring[keyring extension].
109 The only major incompatibility is that Git octopus merges (a merge with more
110 than two parents) are not supported.
112 Mercurial branches and bookmarks have some limitations of Git branches: you
113 can't have both 'dev/feature' and 'dev' (as Git uses files and directories to
116 Multiple anonymous heads (which are useless anyway) are not supported; you
117 would only see the latest head.
119 Closed branches are not supported; they are not shown and you can't close or
120 reopen. Additionally in certain rare situations a synchronization issue can
121 occur (https://github.com/felipec/git/issues/65[Bug #65]).