> create multiple directories (workspaces) backed by a single repository at different commits
This is `git worktree`.
They don't work with submodules but submodules are a disaster that should be avoided anyway so probably no big loss there.
Ah, I was not familiar with that feature in git. In that case, I'll swap out jj workspaces for sparse checkouts :-)
Apparently git sparse-checkout exists! I'm going to stop guessing features that git doesn't have now.
> to reset or view the repo at a previous state
What about `git reflog`?
That lets you see previously checked out revisions. Jujutsu keeps track of all previous repo state. In git, you can pull a new remote branch, delete that branch, and push the deletion. If you want to get that branch back, git reflog will only save you if you checked out that commit. If you didn't, you're SOL. Jujutsu will let you undo the delete operation, restore the repo to a state where the branch existed, or view the repo at a state where the branch existed, and create a new branch at the same revision that the old branch was before it was deleted.
That might be cool, actually.
FWIW, I cheated on a previous job for months by working 10% or so, then faking git commit data to spread it out across the week before sending a PR.
Thank you "git commit --amend --no-edit --date xxx"
This is interesting, thanks!
Re:Jujutsu for Busy Devs
by Moomoomoo309 on Tuesday July 22, 2025 @01:17PM
(#44650274)
What if you commit secrets to the repo by accident?
Jujutsu repos only exists locally. There are no Jujutsu remotes, only git remotes. Repo properties unique to Jujutsu (repo history, stable revision IDs) are not pushed to git remotes.
Just edit it out and don't push it to upstream?
- jj undo, jj op restore, and jj --at-op to reset or view the repo at a previous state
- create multiple directories (workspaces) backed by a single repository at different commits
These are the only things I can think of off the top of my head that you can do with jj that you can't do with git.