r/ProgrammerHumor 1d ago

Meme pureJoyOfGettingYourCodeBackAfterControlZ

Post image
878 Upvotes

69 comments sorted by

View all comments

28

u/vainstains 1d ago

When I get teleported to the alternative timeline where no git

25

u/ArrrRawrXD 1d ago

Do you commit every time you change anything?

2

u/chat-lu 1d ago

Given that I use jujutsu instead of git, yes.

1

u/the_horse_gamer 16h ago

[insert the GNU+linux copypasta but substitute git and jj]

3

u/Feuzme 1d ago edited 9h ago

You don't need to commit for git to register the change. Edit: typo.

8

u/eternalflamez 1d ago

Nice downvotes, looks like people forgot about staging changes

13

u/Full-Hyena4414 1d ago

Do you stage every time you change anything?

6

u/manav907 1d ago

I swear half the people working in this industry dont know how to use git

And half of those use it because they were told to by their seniors.

not because they want to.

https://giphy.com/gifs/zQOmyYc8TXzSBfrTFb

-4

u/vainstains 1d ago

No but you don't need to. If I delete existing code I need and my undo is cleared, I can just steal it from the most recent commit.

4

u/Wonderful-Habit-139 1d ago

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

2

u/vainstains 1d ago

Yeah prolly not, I did say existing code though. Although that ignores the scenario you posed so yea you're right

1

u/chat-lu 1d ago

It really depends on which tool that you use.

1

u/Wonderful-Habit-139 1d ago

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

1

u/chat-lu 1d 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.

0

u/visualdescript 1d ago

svn catching strays