▲ | nchmy 4 days ago | ||||||||||||||||||||||||||||||||||||||||
You'd only really learn anything if you know nothing. The underlying git is largely invisible, and the workflows are vastly different - for the better. It is constantly making new git commits any time you use a jj command. (I even have it set up to use watchman to create commits any time any file changes - this is unimportant for this discussion). But the commits are completely hidden - we instead interact with jj "changes", which are more like a constantly evolving, auto-adding, auto-committing, stash-free, movable git commit. Git branches are even a 2nd class citizen. We can create endless "branches" by adding new changes on top of any existing change, and then merge that with an arbitrary amount of other changes by specifying them when creating a new change. We can also rebase/move changes around all over the place, and the changes get automatically propagated through any descendents. We can also split and squash commits very easily, and even do so on a granular level - easily and interactively select lines or sections of changed code within one change to be split or squashed into a different change. This allows you to just work, and then tidy the history up later when you have a clue. Conflicts that arise from merge/rebase/split/squash/etc do not require immediate intervention - fix them when you want to, and the fix will also propagate through. You can use jj resolve to open the conflicts in your merge conflict editor of choice (I use vs code). We use git branches when we apply/update a jj bookmark to any change. This essentially creates/changes a git branch, which can then be pushed to Github. When bookmarks are pushed, the ancestor changes become "immutable" by default, which prevents things like editing, rebasing etc, so as to facilitate collaboration. But it can be override, and I presume it does things like a force push for you. One thing to note is that your jj "branches" etc are not shared as it just stays local. You could, in theory, sync your .jj folder remotely, but I don't see that being particularly feasible unless it's just to sync with another device for your own use (or back it up in case of data loss). It's really just a local interface for individual use, and collaboration still happens via git branches and pull requests. If you were to lose your jj folder, you could clone the git repo again and you'd just start with the existing git branches etc. I'll mention one particularly powerful/useful jj workflow - the megamerge. There's a few detailed articles out there if you search for it, and they've been discussed on hn as well (I'm on phone so can't be bothered). It allows you to merge numerous feature "branches" (again, jj branches, which are optionally also git branches if you use bookmarks) into a new branch, which lets you easily work on top of the combined functionality of various branches that are in progress. You can then interactive squash changes into their respective feature branches prior to the empty megamerge commit/change. There's also jj absorb, which does this interactive squash in a sort of magical, automatic way (though I find that sometimes it just doesn't do anything) There's so much more to say about it, but overall you just don't need to think about git at all and instead just think about your code, and then tidy up the history etc as-needed, without much cognitive overhead or friction. This is all made even easier by the absolutely fantastic https://github.com/idursun/jjui TUI. It's largely "just" a wrapper with shortcuts over jj commands and their resulting output. But it makes what's already simple absolutely seamless. I hope this helps. Jj and jjui are absolutely beautiful. Ignore all the luddites who try to say "if it's just git under the hood, then I'll just keep using that myself, thank you very much". I never intend to "raw dog" (as the kids say) git again. I do use some git mechanisms in vscode though - merge conflict resolution, diff visualization (it shows whatever has changed in the current jj change) | |||||||||||||||||||||||||||||||||||||||||
▲ | horse2 4 days ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||
I would rather recommend ignoring people who automatically follow every latest fad without much thought, especially to those who dare call themselves “engineers”. Learn both and make an informed decision. The new shiny thing is not better just because it is new and shiny, especially when it's just an abstraction over the old thing. Not too long ago people who refused to be dragged into the blockchain circus were called luddites by some. Now no-one even remembers that, the industry has moved on to another buzzword du jour. Not every change for the sake of change is “progress”, there are more dead-ends that lead nowhere than things that stick with us for a long time. Also: old men make the world go brrr, it's not an insult as you seem to think it is. I wonder what the Linux kernel folk would say to your insinuations, if they had time to waste here. Or the OpenBSD guys who are much more conservative still. | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
▲ | paradox460 4 days ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||
Do you really need watchman for that, when each changesets has an evolog with snapshots | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
▲ | rifofbfpfjfb 4 days ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||
what's your "config" to snapshot on every file change? | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
▲ | terminalbraid 4 days ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||
What does Luddite mean to you? | |||||||||||||||||||||||||||||||||||||||||
|