diff --git a/hgext/convert/__init__.py b/hgext/convert/__init__.py
index 35fa7c77c754aa4d156c42abfdb61ca178468872_aGdleHQvY29udmVydC9fX2luaXRfXy5weQ==..d9133e89d39decf425ddf9fcec3a62fb5f5b8bbf_aGdleHQvY29udmVydC9fX2luaXRfXy5weQ== 100644
--- a/hgext/convert/__init__.py
+++ b/hgext/convert/__init__.py
@@ -309,6 +309,10 @@
         is very expensive for large projects, and is only effective when
         ``convert.git.similarity`` is greater than 0. The default is False.
 
+    :convert.git.remoteprefix: remote refs are converted as bookmarks with
+        ``convert.git.remoteprefix`` as a prefix followed by a /. The default
+        is 'remote'.
+
     Perforce Source
     ###############
 
diff --git a/hgext/convert/git.py b/hgext/convert/git.py
index 35fa7c77c754aa4d156c42abfdb61ca178468872_aGdleHQvY29udmVydC9naXQucHk=..d9133e89d39decf425ddf9fcec3a62fb5f5b8bbf_aGdleHQvY29udmVydC9naXQucHk= 100644
--- a/hgext/convert/git.py
+++ b/hgext/convert/git.py
@@ -376,8 +376,9 @@
         prefixlen = len(prefix)
 
         # factor two commands
-        gitcmd = { 'remote/': 'git ls-remote --heads origin',
-                          '': 'git show-ref'}
+        remoteprefix = self.ui.config('convert', 'git.remoteprefix', 'remote')
+        gitcmd = { remoteprefix + '/': 'git ls-remote --heads origin',
+                                   '': 'git show-ref'}
 
         # Origin heads
         for reftype in gitcmd:
diff --git a/tests/test-convert-git.t b/tests/test-convert-git.t
index 35fa7c77c754aa4d156c42abfdb61ca178468872_dGVzdHMvdGVzdC1jb252ZXJ0LWdpdC50..d9133e89d39decf425ddf9fcec3a62fb5f5b8bbf_dGVzdHMvdGVzdC1jb252ZXJ0LWdpdC50 100644
--- a/tests/test-convert-git.t
+++ b/tests/test-convert-git.t
@@ -642,6 +642,30 @@
   $ hg -R git-repo6-hg tip -T "{file_dels}\n"
   .hgsub .hgsubstate
 
+convert using a different remote prefix
+  $ git init git-repo7
+  Initialized empty Git repository in $TESTTMP/git-repo7/.git/
+  $ cd git-repo7
+  $ touch a && git add a && git commit -am "commit a"
+  [master (root-commit) 8ae5f69] commit a
+   Author: nottest <test@example.org>
+   1 file changed, 0 insertions(+), 0 deletions(-)
+   create mode 100644 a
+  $ cd ..
+  $ git clone git-repo7 git-repo7-client
+  Cloning into 'git-repo7-client'...
+  done.
+  $ hg convert --config convert.git.remoteprefix=origin git-repo7-client hg-repo7
+  initializing destination hg-repo7 repository
+  scanning source...
+  sorting...
+  converting...
+  0 commit a
+  updating bookmarks
+  $ hg -R hg-repo7 bookmarks
+     master                    0:03bf38caa4c6
+     origin/master             0:03bf38caa4c6
+
 damaged git repository tests:
 In case the hard-coded hashes change, the following commands can be used to
 list the hashes and their corresponding types in the repository:
diff --git a/tests/test-convert.t b/tests/test-convert.t
index 35fa7c77c754aa4d156c42abfdb61ca178468872_dGVzdHMvdGVzdC1jb252ZXJ0LnQ=..d9133e89d39decf425ddf9fcec3a62fb5f5b8bbf_dGVzdHMvdGVzdC1jb252ZXJ0LnQ= 100644
--- a/tests/test-convert.t
+++ b/tests/test-convert.t
@@ -259,6 +259,10 @@
                     for large projects, and is only effective when
                     "convert.git.similarity" is greater than 0. The default is
                     False.
+      convert.git.remoteprefix
+                    remote refs are converted as bookmarks with
+                    "convert.git.remoteprefix" as a prefix followed by a /. The
+                    default is 'remote'.
   
       Perforce Source
       ###############