4 ms·
So for me, the most compelling thing about jj is that it is somehow simpler than git, while also being more powerful than git. What I mean by simpler is, there
by steveklabnik 1y ago
So for me, the most compelling thing about jj is that it is somehow simpler than git, while also being more powerful than git.
What I mean by simpler is, there's fewer features, which makes things easier to pick up, because these features fit together in a way that's more coherent than git's. By more powerful, I mean jj lets me regularly do things that are possible, but annoying and/or difficult in git.
I loved git. I was never the kind of person who thought its CLI was bad. But then, when I found jj, I realized why people thought that.
- jimbokun 1y agoSo better UX while keeping git's solid internals? Makes sense. Developers I know have been wanting that.
- steveklabnik 1y agoIt's technically a bit more than that. JJ is its own VCS, with pluggable backends. Google has a closed-source Piper backend, the git backend is the only real open source backend. But at high level, it's fine to think about it in that way, yeah. I tend to think about it as being more "able to work on git repos" than as a UI.
- warwren 1y agoI can't hear Piper backend without thinking about Pied Piper
- SoftTalker 1y agoNot the only project that's working on that. https://www.gameoftrees.org/ https://www.gameoftrees.org/
- wk_end 1y agoAs someone who loves git, has always thought the criticisms about its interface were overstated... but also feels like it maybe has too many incoherent ways of doing things, this is the best sales pitch I could've asked for (and I came to the comments to ask for a sales pitch). Thanks - I'll try jj out the next time I start a hobby project.
- steveklabnik 1y agoYou're welcome, and feel free to let me know how it goes. There is an adjustment period, for sure, and (in another eerie parallel to Rust) some folks try it, bounce off, and try again later, and it sticks then. The auto-commit behavior was one of my biggest concerns when starting, but it turns out that when combined with other things, I'm a huge fan now, for example.
- lowboy 1y agoAnother good sales pitch is `jj undo`[0]. It puts the repo back to previous state, regardless of what the mutative operation was. It's a powerful and simple safety net that unlocks experimentation. It does this by adding an new operation on top of the operation log[1], so you don't lose repository states by moving up + down the op log. There's a corresponding `jj redo` as well. 0: https://jj-vcs.github.io/jj/latest/cli-reference/#jj-undo https://jj-vcs.github.io/jj/latest/cli-reference/#jj-undo 1: https://jj-vcs.github.io/jj/latest/operation-log/ https://jj-vcs.github.io/jj/latest/operation-log/
- socalgal2 1y agojj undo is great but it's a one time thing. You can't do jj this, jj that, jj other, jj undo, jj undo, jj undo AFIACT. You have to look into the op log and jj op restore for that. It's nice you can get back to where you were though. The biggest issue for me is it requires active change management (or feels like it). In git I do `git checkout foo` then I start editing. If I want to see what may changes are since foo then `git diff` tells me. With jj though, `jj edit foo` is the to git, state of the repo ALL changes to foo. So any new edits are invisible. So, instead of `jj edit` I have to do `jj edit` `jj new`, then later squash those into foo I know there are similar cases in git but I guess I'm just used to git so I wasn't using those cases. that said, I'm mostly enjoying jj. Though quite often i get a conflict I don't understand. Today I got 2 and it told me choose A or B. I did `jj diff -r A -r B` and it said no diffs. If no diffs aren't there no conflicts? I'm sure someone gets it but it was annoying to just have to pick one to abandon
- mkeeter 1y ago
- nonethewiser 1y agocan you directly get the parent branch of a branch in jj? This is one thing that I constantly find myself wishing was in git but inevitably resign myself to knowing "thats just not how git works."
- steveklabnik 1y agoCould you spell out slightly more what you mean? I'm not 100% sure what "get" means.
- 1718627440 1y agoI think they mean what other branch some branch was originally branched off from.
- nonethewiser 1y agoYes. I could see confusion about the term "parent" but get? IDK what the confusion is there.
- steveklabnik 1y agoIt was just like, in what context? To print a log? To rebase something? "get" is not a command exactly. That's it. Some of it is also what a "branch" means to different people can mean different things: https://jvns.ca/blog/2023/11/23/branches-intuition-reality/ https://jvns.ca/blog/2023/11/23/branches-intuition-reality/ But yeah, as others have said, not really possible in a general way, sadly.
- nonethewiser 1y agoget as in find, retrieve, identify, etc. Im talking about a use-case not a git feature.
- steveklabnik 1y ago
- petre 1y agoGit's CLI is awful compared to fossil or even mercurial. Jj seems like an improvement over git, but it lacks a web UI like fossil has. It's very useful. Basically like a self contained github lite, only without the needless complexity, the enterprise bs, the annoying login process, tokens, passkeys, brain damaged permissions system etc.
- zZorgz 1y agoJust my feedback - I've personally found jj more complex for simple projects. Like if you have a non-collaborative repo where you push to main most of the time after making a series of commits, in jj you have to keep updating a bookmark before pushing it and there's no one command to do both. If you have another machine on main without any outstanding changes and you want to pull the latest changes that is probably also two steps (git fetch + new?) That said, I've been liking jj quite a bit for more mature / collaborative projects. It has been a learning experience. (don't enjoy updating bookmarks for PR branches though; jj encourages rewriting history which is not my favorite choice for code review branches; I often work in repos that squash-on-merge).
- steveklabnik 1y agoYeah, in that case you may want to configure bookmarks to auto update for sure :)
- zZorgz 1y agoIs there a way to do that today? For updating bookmarks I've found like half a dozen variants of `tug` alias the community has come to using which is just a slight improvement (bit daunting to newcomer to pick 'best' one and not fan setting up aliases on all my working devices). It would be nice if jj was better than git for the fundamental workflows like this out of the box overall.
- steveklabnik 1y agoYes, it's called "experimental-advance-branches" (because it landed before the branch -> bookmark rename). Here's an example of setting it: https://github.com/jj-vcs/jj/blob/c70f9b5b3fff08a86fb11afc576c55f16f216a3b/cli/tests/sample-configs/valid/experimental-advance-branches.toml#L2-L4 https://github.com/jj-vcs/jj/blob/c70f9b5b3fff08a86fb11afc57...