4 ms·
It usually works, but sometimes it'll try to use git instead of jj at random and needs a reminder. As JJ is not completely stable it tries some old commandline
by Okkef 8mo ago
It usually works, but sometimes it'll try to use git instead of jj at random and needs a reminder. As JJ is not completely stable it tries some old commandline versions as well. This improved after I put in some lines in my agents file, but still it's much better at complex changes with git than jj.
- KingMob 8mo agoIf it helps, this was all I needed in my CLAUDE.md to make it use jj perfectly: # Version Control - IMPORTANT: YOU MUST assume we use Jujutsu ("jj") for version control. Check by running `jj root` (or look for a `.jj/` directory) to confirm. - If I say "commit", "branch", "squash", etc., assume jj equivalents first. - You can ignore any `git add` command, since jj always auto-adds. - Use `jj` commands instead of `git`. Never run `git` in a jj repository. - ALWAYS prefer jj change IDs over commit SHAs. jj change IDs are stable. - jj doesn't usually require named branches - If you need named branches, use `jj bookmark`, but you must manually update the bookmark after making new commits, since they won't automatically get updated - When reading data from jj, always use `--ignore-working-copy` to avoid snapshotting the working copy (which is slow and unnecessary for read operations). But when writing (commit, squash, rebase, etc.), you MUST NOT use `--ignore-working-copy`. - If you get "Error: The working copy is stale", run `jj workspace update-stale` first
- aabhay 8mo agoYou can set jj to auto update stale workspaces btw
- KingMob 8mo agoI actually asked about that on the GH discussions a couple weeks ago, but based on this (https://github.com/jj-vcs/jj/issues/7229 https://github.com/jj-vcs/jj/issues/7229), I'm not sure it's 100% foolproof to turn on auto-updates. It might be ok for human use, but I have definitely seen agents in one workspace start encroaching on another workspace's turf. (Rare, but it's a huge pain to fix when it happens.)