logoalt Hacker News

diathlast Saturday at 5:36 PM2 repliesview on HN

> Yet another reason to use Jujutsu

And what would that reason be? You can git revert a git revert.


Replies

jsnelllast Saturday at 6:08 PM

You're correct for an actual git revert, but it seems pretty clear that the original authors have mangled the story and it was actually either a "git checkout" or "git reset". The "file where 1-2 hours of progress had been accumulating" phrasing only makes sense if those were uncommitted changes.

And the reason jj helps in that case is that for jj there is no such thing as an uncommitted change.

show 2 replies
mbb70last Saturday at 6:02 PM

Probably it actually ran git checkout or reset. As you say git revert only operates on committed snapshots so it will all be in the reflog

show 1 reply