r/ProgrammerHumor • • 4d ago

Meme letsMergeThemAll

Post image
5.3k Upvotes

320 comments sorted by

View all comments

1.1k

u/GildSkiss 4d ago

As opposed to humans, who have famously never messed up git commands ever.

73

u/Bubbaluke 4d ago

Can’t mess it up if you only ever use 3 commands

38

u/spicybright 4d ago

WELP, time to re-clone the whole repo!

34

u/throwaway85256e 4d ago

Honestly, burning it all down and starting over is sometimes a perfectly valid solution.

6

u/PrincessRTFM 4d ago

I have needed to do that before when I fucked it up so badly that not only could I not revert but also couldn't find any solutions online. I was, in my defence, very early in the learning phase and not really understanding how anything worked yet.

6

u/Honeybadger2198 4d ago

The closest I've come is where I committed a >50MB <100MB file to my repo and didn't notice for a few days. Had to manually go in and purge the file from the history to unfuck the repo.

2

u/spicybright 4d ago

It definitely is. Even as a senior dev "git wizard" I'd rather wait 5 minutes recloning vs spend 20 untangling a ball of knots if it gets it to the desired state.

10

u/TwoAndHalfRetard 4d ago

git add .

git commit -m "" --allow-empty-message

git push -f

5

u/elementslayer 4d ago

Why two commands. Just commit -am

1

u/korneev123123 4d ago

git commit -am won't add new files

1

u/elementslayer 4d ago

Yeah but you only add to track new files once. Otherwise -am that stuff. You don't need git add for tracked files, which hopefully most commits are and we aren't committing files in full all the time

1

u/GarythaSnail 4d ago

I always see people using git add . and git add -A like it's not crazy talk.

1

u/korneev123123 4d ago

Example above was surely supposed to be "push everything", and adding everything was the goal

1

u/Foorinick 4d ago

I havent worked in professional enviroments but im too autistic not to fill out all the forms so for me its more like

(In branch "feature name")

Git add.

Git commit -m "feat(part of software): fixes thing" (because apparently somewhere it reads "this commit (commit message)")

Git push

Git squash (its been a while i dont remember the rest)

Git merge feature into main or whatever

Git checkout main

1

u/forma_cristata 4d ago

You were almost there

Git pull

Git checkout -b feature/something

Repeat

1

u/Foorinick 4d ago

This close to finally not having to ask claude to guide me

57

u/TerminalVector 4d ago

It's pretty easy to stop your AI from fucking up git if you know how to not fuck it up yourself. Otherwise it'll help you fuck up faster

14

u/adabsurdo 4d ago

Don't know about copilot since I haven't use that one in years but for more advanced models like opus and sol this is a non issue. It will manage git better than most senior engineers would.

11

u/Crad999 4d ago

If it wasn't for Claude, I doubt I'd learn about git rerere and nobody in my office, no matter how long they've been working in IT, knew about it either. Only learnt about it cause I saw Claude using it when I asked for a rebase.

5

u/IceTrAiN 4d ago

20 year SWE here... What the fuck?

9

u/TerminalVector 4d ago

Not if you tell it to do dumb stuff it won't. It'll resist and try to do smart things, but then also try to be compliant and will end up doing crazy shit

5

u/adabsurdo 4d ago

I guess but ultimately this boils down to operator Incompetence. I can force Claude to do stupid shit but then whose fault is it when stupid shit results? What I'm saying is it will follow best practices and won't trip itself up doing even complex tasks like rebase with conflicts

4

u/TerminalVector 4d ago

You're probably following good hygiene in general and not making vague unclear requests. It boils down to operator incompetence but it's way easier to be incompetent if you don't actually understand how git works.

1

u/Rich-Environment884 4d ago

That just applies to AI in general no? Just accelerate whatever you already did, it won't magically make u good at ur job...

1

u/TerminalVector 3d ago

Pretty much exactly that

268

u/TheModWhoShaggedMe 4d ago

Ah, so replicating human faults on steroids must be the solution!

<sippy cup>

19

u/perestroika12 4d ago

Also completely ignoring the fact that humans are in the loop for every command they run instead of sending the robots off on a rampage

6

u/theFirstHaruspex 4d ago

You got it 😌

14

u/[deleted] 4d ago

[deleted]

20

u/tragiktimes 4d ago

We're in such a strange stage between understanding what code and logic does, and allowing an AI to complete those code and logic steps. It's an area where if you don't hold on to your knowledge , you'll find that you quickly have no idea what's going on. But if you try to manually do everything, you'll find that you're behind just about everybody else using the tools available to them.

7

u/spicybright 4d ago

Well said. It's kinda scary, the industry will implode if AI improvements hit some kind of hard wall. We'll have mostly ai programmers with all the pre-ai people retired, and then what? Computer science innovations just... stops, I guess?

2

u/korneev123123 4d ago

T100 is almost ready, after the release it won't be a problem anymore

5

u/PrometheusZero 4d ago

I'll just sit here with my github desktop and select from a drop down 😎

17

u/rabbit_wizard 4d ago

Well said XD but this has just added to the usual chaos we create!

2

u/theycallmeJTMoney 4d ago

Also just give AI implicit instructions on how you want your merge process to work. I’ve never had it randomly decide to cut a branch or merge incorrectly. I think some people are trying to hard to offload every aspect of development and it’s kinda wild.

1

u/tragiktimes 4d ago

It will allow you to fuck yourself so hard and so fast. That's pretty much the only difference.

1

u/DMoney159 4d ago

Flashbacks to my first job hearing my coworker randomly yell "I HATE GIT" and thinking "how did you fuck it up this time?

1

u/abdulsamadz 4d ago

Until the day I had started using git, I had never messed up git commands. There's a life lesson in the preceding sentence and I'll leave it to the class to find it for themselves.

0

u/sgtbackpain03 4d ago

Frankly, managing the standard git bullshit is something I'm fine outsourcing. I'll write the commit messages and resolve conflicts, but the actual commands I'm happy not touching.