Jujutsu on Github

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-edit
    • jj squash -i (or jj squash src/main.rs if a file only has edits relating to one specific change
  • jj undo is so useful for undoing mistakes that you made, and it’s so easy to use!
  • jj is completely compatible with git. 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!)

Disliked

  • jj would automatically add artifacts that weren’t ignored previously to previous commits.
    • For example, I had a directory book/ that was automatically generated by mdbook whenever I built the book. It was added to my .gitignore when I started working with mdbook. If I needed to edit something before I added it to my .gitignore, then suddenly everything in the book/ 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 jj specifically, git has this problem, too. However because there is no “staging”, it’s easier to miss with jj

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.