5 ms·
I suppose I want the article written for the experienced developer, convince me why I should try something different than the huge defacto standard that is git.
by marcuskaz 1y ago
I suppose I want the article written for the experienced developer, convince me why I should try something different than the huge defacto standard that is git. I'm totally open to trying something new, but need a compelling case.
Beyond `jj undo` everything else in this thread feels just as complicated as git.
- baq 1y agodo you know about git rerere? if yes, you might like jj.
- spooneybarger 1y agoThis made me laugh. Thank you.
- baq 1y agoIt’s funny because it’s true! ;)
- stavros 1y agoThere isn't a single thing in jj that's as complicated as git. I could go on to list a few features, but it would sound underwhelming, because you could do all that in git. It's kind of like asking "why would I buy a digital camera when my film camera does all the same things? I can already see what the photo will look like when I take it, and developing my own film isn't that much of a hassle", yet film cameras have gone the way of the dodo, except for the occasional nostalgic enthusiast.
- cortesoft 1y agoI don't think this is what the person you responded to is asking. Their question is more, "why would I buy a digital camera that takes pictures in a new format that only a few cameras understand? All my tooling, 3rd parties, and other camera I own use the standard format. Even though I can see why the new format has advantages, I am still going to have to use the other format for all these other photos I have to work with, and there aren't equivalent tools in the new format for all these other photos things I need to do. Even if I buy this new camera, I am still going to have to work with the old format, so I'll have to learn how to use two formats now, and get used to two tool chains. Since the existing format is something I am going to have to use either way, how is it worth it for me to have to use two formats?"
- stavros 1y agoYou don't have two formats, though. Jj transparently works with git. I use it for everything and none of my collaborators is even aware that I'm using jj.
- mcepl 1y agoIf you say that you can work only with JJ and never use git, you are delusional. For one, where is that JJ forge (i.e., the equivalent of Sourcehut)?
- Macha 1y agoGitHub, or sourcehut, or whatever you prefer. Maybe you feel that jj git fetch and jj git push are using "git" but it means you avoid the git cli in favour of the IMO better designed jj cli.
- stavros 1y agoI could respond to this uselessly pedantic comment, but then nobody wins.
- mcepl 1y agoI didn’t mean to be pedantic. My experience with Jujutsu was as bad as with Mercurial (and hg-git, I believe?) … after couple of hours working with my repo (https://git.sr.ht/~mcepl/m2crypto https://git.sr.ht/~mcepl/m2crypto), looking at it with git, I got incomprehensible mess of destroyed multiple unmergeable heads (especially for Mercurial), and completely destroyed other branches, where I was not planning to work (Jujutsu). The only resolution in both case was export my work to plain patches, rm -r the checkout, clone again with git and forget anything about those other VCSes. So, I claim that Jujutsu actually doesn’t work well with git repositories (and forges) very well, and I would like to see a native one.
- stavros 1y agoIt works fine for my use case, all my Github repos are in the state I'd expect, and I sometimes use git in my local repos as well, and that works fine. Hell, sometimes I use jj to fix a mess I made in git. The only issue is being in detached HEAD all the time, but in practice it's not a big problem for me.
- Izkata 1y agoA couple of them seem more complicated, like the example further up on the page for postponing merge conflicts. In git I'd just abort the merge and do it later. I also found the exchange about named branches funny, that ends with: > Ok, you need to call `jj bookmark set -r@ XYX` (or `jj b s -r@ XYX`), so what? Apparently this is excusable, but people like to complain about git's commands being too obtuse - as far as I understand the git version is "git checkout -b XYX", right? (Or I guess "git switch -c XYX" with the new commands)
- steveklabnik 1y agoThat’s backwards, your git command is “move to this branch” and the jj command is “update where the branch points to,” so git reset —hard.
- Izkata 1y agoThe git commands are "create new branch at HEAD and switch to it", and the context of the thread above sounded like that's the functionality they wanted?
- steveklabnik 1y ago“jj bookmark set” doesn’t create a new branch and switch to it. It updates the head of an existing branch to a new place. jj doesn’t have a “name a new branch and switch to it” command, because you usually don’t bother naming branches until you’re using them up to a forge, and there’s no “current branch” concept. I creat new named branches with “jj git push -c” which names it for me, and switching branches is closest to jj new or jj edit.
- tsimionescu 1y agoThey're closer to the right command than you are. `git reset --hard` will move HEAD to the given branch. The right command would be `git checkout -B branch` / `git switch -C branch`, to create or update `branch` to point to the current commit (except for the side effect that future commits will then go onto `branch` in git, while they won't in jj). Basically, jj is just like working with git in detached head mode as far as I can tell.