Jujutsu (or jj for short) is a distributed version control system that is works with changes instead of commits. A change is a collection of edits that can be modified, as opposed to a commit which is a fixed collection of edits.
Liked
- Thinking in terms of changes rather than commits allowed me to organize my changes a lot easier and more coherently
- Any time I realize that I forgot to do something in a previous commit, I could just
jj edit <changeID>, make my change, then go back to the commit that I was working on - Organizing a bunch of changes that I’ve just made into individual commits is easy, even if I forgot to commit as I went. For each change:
jj new -B @ -m "description of specific change" --no-editjj squash -i(orjj squash src/main.rsif a file only has edits relating to one specific change
jj undois so useful for undoing mistakes that you made, and it’s so easy to use!jjis completely compatible withgit. None of my coworkers even know that I’m using it, so I don’t have to try and convince them to learn a new VCS (although I might now that I know how awesome it is!)- Rebasing is AMAZING!!!
- My friend merged a huge PR with changes that affected 80% of the codebase. I had a PR that had been sitting around for a while, and I had to rebase my code off of his to get it merged.
- I was able to go step by step through each change, merging the conflicts that appeared at each step. Git technically lets you do this, but it’s more difficult to figure out what changes were made.
jj’s conflict markers clearly show the previous change that was made, as well as the current state of the code before the change. That description doesn’t do it justice in the least, though. It’s just amazing! - Also, because
jjmakes it easier to keep changes grouped together, it was very clear what change I was intending to make, which allowed for better conflict resolution. - I can’t explain how EPIC it felt to rebase with
jj! It was the best rebasing experience I’ve ever had!
Disliked
jjwould automatically add artifacts that weren’t ignored previously to previous commits.- For example, I had a directory
book/that was automatically generated bymdbookwhenever I built the book. It was added to my.gitignorewhen I started working withmdbook. If I needed to edit something before I added it to my.gitignore, then suddenly everything in thebook/directory would be added to the commit that I was editing since it wasn’t being ignored. I usually caught it before it caused any problems, but it did slip through once. - This isn’t a problem with
jjspecifically,githas this problem, too. However because there is no “staging”, it’s easier to miss withjj
- For example, I had a directory
Overall Impression
I love jj! I think that it’s going to be my VCS for the next little bit. I’m impressed with all of the improvements that they’ve made to git. I also like that I can use it with any project that uses git without having to do a thing.
In conclusion, jj matches my dream workflow so well. 10/10 would recommend jj.