HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
schacon
hg-git
Python2010–2015
schacon / hg-git · Archived

hg-git

mercurial to git bridge, pushed to directly from the hg-git plugin in Hg

4Distinct people
5Mentions
0Explicit recommenders
618GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

mercurial to git bridge, pushed to directly from the hg-git plugin in Hg

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year5 dated mentions

Observed mentions: 2010-03-18 22:22:45 UTC to 2015-03-05 04:00:50 UTC.

0122010-01-01 00:00:00 UTC to 2011-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20102011-01-01 00:00:00 UTC to 2012-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2012-01-01 00:00:00 UTC to 2013-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20122013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2015

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20102010-01-01 00:00:00 UTC2011-01-01 00:00:00 UTC101
20112011-01-01 00:00:00 UTC2012-01-01 00:00:00 UTC202
20122012-01-01 00:00:00 UTC2013-01-01 00:00:00 UTC000
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC000
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC000
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC202

What Hacker News says

5 sources
Hm... you're right about needing to use ssh+git -- at least with github[1] (I don't have anything on github yet, I just host my own mercurial repos across a couple of machines for whatever I'm working on). However, after forking a repo on github, everything seems to work fine for me: hg clone git+ssh://git@github.com:e12e/QuickTun.git qt.hg cd qt.hg echo "Mercurial hg-git test." > test hg add test hg ci -m "Just a test of hg-git push/pull to github." hg push # outputs: pushing to git+ssh://git@github.com:e12e/QuickTun.git Warning: Permanently added the RSA host key for IP address '192.30.252.131' to the list of known hosts. searching for changes adding objects added 1 commits with 1 trees and 1 blobs updating reference refs/heads/master I can see how the need for using ssh could be
Read the rest
a problem on windows, where you need to (AFAIK) get plink/putty working. A quick search seems to indicate that there's no support for using paramiko (python native ssh client/server) for the mercurial client. > it doesn't seem to help you with some of the more horrible git interactions, such as doing a pull from upstream to your forked github repository. Continuing from above, nothing stops you from: hg pull git+ssh://git@github.com:UCIS/QuickTun.git Although working with multiple remotes in mercurial is generally done by adding them to .hg/hgrc. Eg adding: upstream = git+ssh://git@github.com:UCIS/QuickTun.git Allows you to do: hg pull upstream and hg push upstream And you can get a sense of what's going on: hg tags tip 59:b6067e2362b5 default/master 59:b6067e2362b5 upstream/master 58:e5d10c76fcad Not sure if that helps vis-a-vis using git, but as I said, I find the mercurial commands more intuitive, consistent and friendly -- to the point that I find it makes quite a difference for me, personally. That said, if you want to/have to work with github-based repositories, you might be better off just sticking with git. [1] https://github.com/schacon/hg-git/issues/152
In Gitless – An experimental version control system built on top of Git
> I'd love to see something that makes git easier to use. I'm not really aware of any problems with mercurial's git-support[1]. It might not really be "working with git", but does support working with (as in pushing and pulling) git repos. And while I think there'll never be a consensus on mercurial versus git -- I find that the interface is much cleaner in mercurial, than with git. So if by "easier" you mean "easier command line use", I think mercurial is worth a look. If not, perhaps look at various guis -- but I've not got any experience with them. hg help git Working with Git Repositories """"""""""""""""""""""""""""" Basic Use --------- You can clone a Git repository from Hg by running "hg clone <url> [dest]". For example, if you were to run: $ hg clone git://github.com/schacon/hg-git.git
Read the rest
Hg-Git would clone the repository and convert it to an Hg repository for you. (...) If you are starting from an existing Hg repository, you have to set up a Git repository somewhere that you have push access to, add a path entry for it in your .hg/hgrc file, and then run "hg push [name]" from within your repository. For example: $ cd hg-git # (an Hg repository) $ # edit .hg/hgrc and add the target Git URL in # the paths section $ hg push [1] http://hg-git.github.io/
In Gitless – An experimental version control system built on top of Git
You can use it the other way. It's a little more awkward, though. Go to the github page: https://github.com/schacon/hg-git and scroll to the very bottom. Read the section on the "git.intree" option. After setting that to True, you can pull from a remote hg repo into your local git repo by doing "hg pull" (or "hg clone") followed by "hg gexport". Then do some work in git. Afterward, you can push from your git repo to a remote hg repo by doing "hg gimport" and then "hg push". You may wish to write git command wrappers git-hgpull and git-hgpush to automate those tasks. I should note that I haven't actually done this myself.
In Hg-Git Mercurial Plugin

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.