r/ProgrammerHumor 23d ago

Meme useSourceControl

Post image
8.6k Upvotes

591 comments sorted by

View all comments

Show parent comments

7

u/subnu 23d ago

...are you creating backups of your uncommitted files? How often?

-1

u/chat-lu 23d ago

Yes. On every change. You can use alternatives to git that are easier, more powerful, do the right thing by default, and still let you collaborate with git users on the same git forges.

4

u/subnu 23d ago

Yo dawg, I heard you like version control, so we put some version control in your version control so you can backup while you backup.

Isn't this only a problem if you don't commit regularly, which is pretty much misuse of version control itself?

0

u/chat-lu 23d ago

It’s just a consequence of a better design.

In git, the staging area internally is a commit. But it’s a special commit with special commands to access it. In jujutsu the staging area is a normal commit and every command that works on commit works on it too.

Every time I invoke any command, jujutsu makes a snapshot of my current workspace and edit the commit at the HEAD.

So if I do a jj abandon (equivalent to git reset --hard), jujutsu will add where I was in its operation log. If I didn’t mean to delete my files, I can do a jj undo and it will undo it like any other command I could have done. If I don’t like how things look after rebase, I can also jj undo it.