Ask HN: Git Alternatives – Sapling vs. Jj
41–50 of 66 posts
Re: Ask HN: Git Alternatives – Sapling vs. Jj
#42> I am uninterested in `you can do that in git with [insert esoteric commands]`. Why? If the only requirements you specified are that you're looking for something that is compatible with Git but with better ergonomics, wouldn't something that wraps Git (whether that's via aliases or something more comprehensive) fit the bill?
It's a fair question, but the answer is simple: because there are significant design choices in the UX and algorithms which are user visible, and percolate throughout the entire system design, which can't just be wrapped or alias'd away. There is git-branchless, which is kind of like this[1][2] and is something like a half-way point between Git and Jujutsu/Sapling. However, it needs to be stated that git branchless d…
- https://blog.waleedkhan.name/git-undo/ — has a link to this article explaining some things that can't be undone in the Git model via reflog: https://github.com/arxanas/git-branchless/wiki/Architecture#...
- https://blog.waleedkhan.name/in-memory-rebases/ — It's non-trivial to support workflows like "rebase just commit X out of its branch and insert it before commit Y in that branch" in a single command. jj implements the same workflows as well.
Re: Ask HN: Git Alternatives – Sapling vs. Jj
#43https://github.com/tim-janik/jj-fzf?tab=readme-ov-file#split...
(Another self-promotion)
Re: Ask HN: Git Alternatives – Sapling vs. Jj
#44Re: Ask HN: Git Alternatives – Sapling vs. Jj
#45I have been using `git-branchless` a lot and really liking it. It should be part of the main git project, consider it a halfway between git and switching to some other tool.
For what it’s worth, the main developer of git-branchless is also a `jj` contributor
These days, there are relatively few things that git-branchless can do that jj/Sapling can't, one example being its (somewhat opinionated) `git test` command: https://github.com/arxanas/git-branchless/wiki/Command:-git-...
Re: Ask HN: Git Alternatives – Sapling vs. Jj
#46Re: Ask HN: Git Alternatives – Sapling vs. Jj
#47Re: Ask HN: Git Alternatives – Sapling vs. Jj
#48(if anyone from SC is reading this -- search our wiki for "Jujutsu" and come say hi!)
Pretty much a strictly better experience than git so far — I’m not going back. `jj undo` is something that I expect in every program now and get vaguely annoyed it's not there.
Not having index/staging is great. Checking out another branch, switching to work on another thing, fixing a typo in an unrelated module, etc are all frictionless. "I'll insert a new commit five-commits-ago, do the refactoring there, and resolve conflicts" turns out to be much nicer than "I'll do the refactoring here and carefully stage it hunk-by-hunk". (I get distracted a lot -- maybe if you aren't tempted by shiny refactorings, this isn't a big deal for you.)
The merge story is also great. I have a commit with multiple parents. I can add more parents to it, change parents, rebase it somewhere, move it around. I have no idea how "rebasing a merge" works in git, but I'm afraid to try. In jj I don't care.
There are a few issues with jj that happen to not be a big deal for me, but I can imagine they could be a dealbreaker for someone else:
- No submodules support (yet)
- No LFS support (yet?)
- Doesn't track renames (yet?)
- When you do `git pull` with rebase, git skips duplicate commits -- this is great if something got rebased/amended on the remote. I was always suspicious that `git pull` just works even if I rebased the branch remotely, and now I know why it works. jj doesn't handle this yet. Not a big deal unless two people collaborate on a branch and want to do it the jj-way with rebases of everything.
Re: Ask HN: Git Alternatives – Sapling vs. Jj
#49There's also Pijul. I have only had a brief play with Jujutsu and I haven't tried Sapling but from what I can see, Jujutsu is definitely the best option if you want to actually get stuff done while mostly maintaining Git compatibility. Pijul is definitely still in the research prototype phase, and definitely not Git compatible. I don't know how Git compatible Sapling is, but large parts of it are still labelled "Not…
Unfortunately some of those decades of experience with darcs are lessons in how it performs poorly in large repos or with large teams/lots of merge conflicts, but that still leaves darcs a good experience for small projects and "just getting stuff done".
Re: Ask HN: Git Alternatives – Sapling vs. Jj
#50JJ is incredible. Highly recommend it. I can't put into words what a game changer it is for my workflow. The only thing I reach for for git now is `bisect` when I need to debug an oncall issue.