4 ms·
> because there's no single thing that you can do with jj that you can't with git. - jj undo, jj op restore, and jj --at-op to reset or view the repo at a prev
by Zambyte 1y ago
> because there's no single thing that you can do with jj that you can't with git.
- 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.
- palata 1y ago> to reset or view the repo at a previous state What about `git reflog`?
- Zambyte 1y agoThat 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.
- palata 1y agoThis is interesting, thanks!
- 0points 1y agoThat 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"
- Moomoomoo309 1y agoWhat if you commit secrets to the repo by accident?
- IshKebab 1y ago> 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.
- deleted 1y ago[deleted]
- BeetleB 1y ago> jj undo Yeah - the other day I did a fetch, and then decided I didn't want to fetch. I simply ran "jj undo" to undo the fetch.