At some point get around to writing a longer post about why I don't really like jj/jujutsu. But at least it turns out it's at least pretty easy to block it from my repositories.

The trick is actually pretty simple. And it doesn't even require anything special from your forge!

jj tracks its local state in a .jj folder, right next to Git's .git. There can't be a folder with the same name as a file, so if there already exists a .jj file then any jj command will fail!

$ git init
Initialized empty Git repository in /home/n/junk/jj-be-gone/.git/
$ echo "please don't use jj for this repository" > .jj
$ git add .jj
$ git commit -m "ban jj"
[main (root-commit) 38d2b8e] ban jj
 1 file changed, 1 insertion(+)
 create mode 100644 .jj
$ jj
Error: There is no jj repo in "."
Hint: It looks like this is a git repo. You can create a jj repo backed by it by running this:
jj git init --colocate
$ jj git init --colocate
Error: The target repo already exists
$ jj git clone . asdf
Fetching into new repo in "/home/n/junk/jj-be-gone/asdf"
bookmark: main@origin [new] untracked
Setting the revset alias "trunk()" to "main@origin"
Internal error: Failed to check out commit e1823af07feb7049284adf927f84a49a0a1c84d5
Caused by: Reserved path component .jj in /home/n/junk/jj-be-gone/asdf/.jj

But why?

jj encourages a completely different1 history model than Git.2 That would be "fine" for an obscure tool that I wouldn't have to touch anyway.

But jj is different. It uses Git's wire protocol, so any Git repository is "fair game" for it. I don't love the idea of having to individually block every silly tool out there, but I don't think we should have to accept clients that obey the technical protocol, but break the surrounding social contract.3

Is it always bad?

There are some workflows where jj's UI makes sense. I just dislike the way that it inherently assumes that it is always welcome.

1

And, in my opinion, wrong. But as I said, that's for another post.

2

By default, anyway. You can mangle Git into following the jj workflow (and many bad tutorials suggest you do), but at least the tool itself doesn't try to lead you down that path.

3

See also: LLM scrapers.