rethinking git vs hg

I thought git was just getting better than mercurial. I found that basic git operations are easy, but others appear to be harder than I like (setting up remote repositories).
Just tried the same thing with hg that I tried (and failed to do) with git.
Worked like a charm.

landman@pgda-100:~/target$ hg push ssh://mmmmq@mmmmq/hg/target
pushing to ssh://mmmmq@mmmmq/hg/target
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 5 changes to 5 files

hg can use ssh, which looks like it makes lots of stuff simple. git uses a protocol helper run from xinetd/inetd, or ssh. I need to figure this out. It’s definitely bugging me.
Happily, the next generation of komodo interfaces nicely with both hg and git. Might be time for an upgrade.
But I am thinking of just using hg for the moment until I can really wrap my mind around git. I need the ease of use of the remote repository push. I just don’t see how to easily do it with git, though I know it is possible (and people do it all the time).

5 thoughts on “rethinking git vs hg”

  1. Being one of those who does it all the time, I’m not even sure what’s missing from your description…
    Are you missing “git –git-dir=/where/ever.git init –bare”?
    If git’s helpers git-upload-pack and git-receive-pack aren’t in your login-less path, you may need to explicitly point git at them with –receive-pack=/where/ever/git-receive-pack for git push and –upload-pack=/where/ever/git-upload-pack for fetch. You can set those in your per-repo config; see the receivepack and uploadpack config parameters.

  2. @anon
    Actually it looks like git-push is what I was looking for, roughly equivalent to hg push. The git init and add, and other bits are straightforward.
    Maybe I read the wrong tutorial on git. this one is ok, until they talk about collaboration, which assumes a shared directory. Thats where it diverges from the model we have. This one looks closer, but rapidly assumes a setup which doesn’t exist (git service) internally here.
    What I am looking for is the rough git approximation to this

  3. *cough*
    Check that first tutorial for “Git can also be used in a CVS-like mode, with a central repository that various users push changes to […]”. 😉 And the second one for similar phrasing: “git-push(1) to shared repository […]”.

  4. arg. Hit enter and the browser submitted it.
    Many users of git often set up their repos in visible space and ask others to pull from them rather than push. Some of us use it to maintain code at multiple sites (or one site with no shared home directory; hi DoE supercomputer sites!). Even then, though, I often end up pulling from the remote end so I can manage any differences there. Just style picked up from using git first.
    Anyways, if you set up the remote with git remote, you can just push to the name you gave it. e.g. “git remote add ssh://” and then “git push foo”. That’s one reason why the tutorials gloss over it; using git remote is pretty common now.

Comments are closed.