logoalt Hacker News

rasguanabanalast Tuesday at 3:53 PM3 repliesview on HN

> So anything that would be destructive in git (e.g. rebase, pull, squash, etc) can be undone.

It’s possible to recover from these with git reflog, though.


Replies

BeetleBlast Tuesday at 5:58 PM

I've used git for years, and used reflog once or twice.

I've used jj for only a year, and have used "jj undo" countless times.

There's a huge benefit to having a simpler mental model.

skribantoyesterday at 11:06 AM

From my understanding git reflog works on refs and jj op log works on fhe repo as a whole.

E.g. if I rebase some stacked branches then I want to undo it, with git I would reset each branch separately.

With jj you can timetravel the state of the repo in ine command

ersatz-mattylast Tuesday at 4:04 PM

`jj undo` compared to what exactly?