How I use Jujutsu
47 points by LesleyLai
47 points by LesleyLai
If you are planning to use JJ with an existing Git repo, get rid of the untracked files either by committing them, or deleting them, or adding them to .gitignore.
or .git/info/exclude! it's private to the local clone, which makes it handy for stuff that wouldn't reasonably go in the shared gitignore for whatever reason.
I often will put scratch.* in my .git/info/exclude so I have a way to make "scratch" files for throwaway stuff I never want included. It's a bit tedious to always modify my exclude file. I could write a script to do it, but does jj have any native way to make this global? I don't think so, but curious if anyone knows a better way.
I came here to comment on the same excerpt. I find this aspect to be a small point of friction because leaving random untracked files laying around for days (or more!) at a time is unfortunately a common part of my “workflow”.
On the other hand, it seems for the better that jj eliminates my untracked junk drawer and instead encourages me to deal with/clean up those files right away.
Yes, I cannot agree enough -- right now the behaviour of jujutsu in the presence of untracked or partially staged .gitignores is a major footgun. It's very easy to accidentally seemingly-delete your data (and though it remains in the jujutsu revision history, it can be confusing to recover).
Moving non-shared ignores (and global ignores, too) to .git/info/exclude is the right decision here. I went though all my repositories that I plan to use with jujutsu in the future and did this just to be safe. In the mean time, the jujutsu developers are looking at a couple of options, including (my suggestion) an explicit confirmation needed when switching to a revision where currently-untracked files would be to become tracked.
I recently had a problem where the reviewer asked me to remove changes in the .gitignore. You can imagine the horrible pain this caused.
Also fun: adding to .gitignore for files that have already been mistakenly committed, then figuring out how to cause those files to be deleted the next time someone pulls.
I don't think Jujutsu honors entries in .git/info/exclude. Have you tried it?
Although this was already answered, I do want to mention that it only works in colocated repos (maybe you could stick it inside the private git dir otherwise? never tried it), so if anyone tested this before and found it didn't work, that might be why.
Nice summary! This is very clear and readable and maps nicely to how I have been using jj.
Interesting to see the jj tug alias catching on too. It and its sibling tug- are the only aliases in my own config, and I'd miss them immediately on another machine.
Shouldn't the author mention the special status that jj has inside of Google? Doesn't it have relatively high support in there?
jj is a supported tool for working with Google's monorepo; last I head, this month it is supposed to go to GA for Linux users.
That said, that also involves jj piper commands for their custom build of jj, so I'm not sure how relevant that fact is, because people outside of Google can't use it (or even see it) anyway.
Sorry to start on a side track, but organisations' internal bodies are a particular interest of mine. How does Google's GA work? From your comment, I get the impression that they vote on what tools to use? Does the assembly have right of co-decision, or merely the right to be consulted?
The jj team at Google decides what we consider GA. It's the same team that developed and still maintains the Mercurial-based solution most users currently use. We are still missing a few features before we parity with the Mercurial-based solution. It will not be done this month, and probably not even this quarter. I don't know how much more I can say, so I'll leave it at that.
To me there's a significant difference between:
and
About three months ago I started using Jujutsu (JJ), a new Version Control System, for my personal projects.
From the opening paragraph. I don't see how the employment is relevant if the entire article is about non-work projects.
I'm the author of the post and I do work at Google, but I have no affiliation with the JJ team in Google. JJ can be used to work on Google's monorepo, but I do not use JJ at work yet.
What are the problems Jujutsu aims to solve?
I wrote about this previously here https://thisalex.com/posts/2025-04-20/