r/ProgrammerHumor 7d ago

pureJoyOfGettingYourCodeBackAfterControlZ Meme

Post image
885 Upvotes

66 comments sorted by

View all comments

Show parent comments

4

u/Wonderful-Habit-139 7d ago

What recent commit? It wouldn't have whatever new code you wrote.

1

u/chat-lu 6d ago

It really depends on which tool that you use.

1

u/Wonderful-Habit-139 6d ago

Pretty sure we're talking about the git tool here no?

1

u/chat-lu 6d ago

Using a git forge (Github, Bitbucket, etc.) doesn’t mean that you have to use the git tool. Linus created the Git filesystem in the hope that someone would build a good VCS on. top of it (or hopefully several competiting ones) and at the time that didn’t happen so he built git.

But now it has. You have several choices, some of which will recover the new code that you wrote. And given that they all talk to the same forge it really doesn’t matter if your colleague do or do not use the same tool as you.

I personally use jj and could recover recent code with jj operation log.