3 ms·
Unfortunately, it's not quite that easy --- to be able to push, you need git+ssh, and I've never made that work with github (it just hangs saying something abou
by david-given 12y ago
Unfortunately, it's not quite that easy --- to be able to push, you need git+ssh, and I've never made that work with github (it just hangs saying something about git-upload-pack), and 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.
(And I suspect that if I could do that reliably I would have internalised enough git to use that natively.)
- e12e 12y agoHm... 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 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 https://github.com/schacon/hg-git/issues/152
- david-given 12y agoHmm. I never thought it was so simple. I'll have more of a play and see if I can make it work. I'd _much_ rather use hg than git. Thanks.