813

Yeah learned this the hard way.

you are viewing a single comment's thread
view the rest of the comments
[-] Anafabula@discuss.tchncs.de 25 points 1 day ago

With Jujutsu (which is compatible with git), you can just

jj undo
[-] JustTesting@lemmy.hogru.ch 15 points 1 day ago* (last edited 1 day ago)

Been using it for over a year now and not being scared of trying operations is such a boon. It helps so much with learning when you know you can just roll back to an earlier state.

I've had zero issues with it so far and no one at work noticed anything different, other than there being a bit more rebase spam on PRs.

[-] umfk@lemmy.world 9 points 1 day ago

That is so cool. Why doesn't git have this already?

[-] kata1yst@sh.itjust.works 10 points 1 day ago

I mean, by definition, it does. It just involves parsing through the git log and a bunch of unintuitive, archaic commands.

[-] bitjunkie@lemmy.world 1 points 1 day ago

idk but my dotfiles do:

alias undo="git reset --soft HEAD~1"
[-] mmmac@lemmy.zip 1 points 1 day ago
[-] ezterry@lemmy.zip 2 points 22 hours ago

Anything you can do in Jujitsu you can do in git.. The big difference is a paradime change:

-instead of a working directory that has pending changes you need to add than commit, all changes are in a commit that is lacking metadata.

The system has better "editing" of local history to set that meta data. But once you push to a shared repo you run the usual risks of force pushing.

I'm not sold, rather git not do anything until asked and just run git status constantly but I don't have first hand experience.. I would theory it would be more likely to add a file you didn't mean to.. Unlike those who use windows guis for git and forget to add new files.

this post was submitted on 06 Oct 2025
813 points (96.7% liked)

Programmer Humor

26772 readers
3290 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS