changeset 318:f4a125201c5c

README.md: Add information to convert Mercurial to Git.
author Simon Ruderich <simon@ruderich.org>
date Tue, 06 Apr 2010 10:19:30 -0500
parents 8875c8946ca0
children 3ab3765db5bc
files README.md
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/README.md
+++ b/README.md
@@ -41,6 +41,22 @@
 
 That will pull down any commits that have been pushed to the server in the meantime and give you a new head that you can merge in.
 
+Hg-Git can also be used to convert a Mercurial repository to Git.  As Dulwich doesn't support local repositories yet, the easiest way is to setup up a local SSH server.  Then use the following commands to convert the repository.
+
+        $ mkdir git-repo; cd git-repo; git init; cd ..
+        $ cd hg-repo
+        $ hg push git+ssh://localhost/absolute/path/to/git-repo
+
+To import new changesets into the Git repository you can run the last command as often as you want, only new changes will be pushed.
+
+If the you get the following warning you should setup a bookmark so Git doesn't have to push to the currently checked out branch.
+
+        warning: updating the current branch
+
+To fix this run the following command in the Git repository.  Warning: All local changes are destroyed!
+
+        $ git reset --hard
+
 Hg Bookmarks Integration
 ========================