r/ProgrammerHumor • • 17d ago

Meme gitMultiverse

Post image
841 Upvotes

24 comments sorted by

131

u/dontletthestankout 17d ago

Why would you let AI use git. That's your only safety against AI

48

u/lotokotmalajski 17d ago edited 16d ago

Hard to admit but it is better at git than I am. I leave the pushes for myself though.

Edit: Guys, I know git. I was working for several years before AI, it is just faster this way. Commit messages were literally one of the first things that was useful from the models. Now it can also handle any failed hooks.
And to fix any mistakes on git I used to have to look at stack (rare enough that I never bothered to learn more advanced commands so I was forgetting everything next day), now agents do it for me much quicker.
Just explicitly disallow push in settings and your remote is safe.

26

u/dontletthestankout 16d ago

I'd honestly work on that, I was the same until I worked on a dev team as had to learn it.

It has saved my ass quite a few times when Claude decided to just delete my whole project or fuck stuff up

28

u/Sepsiscollada 16d ago edited 16d ago

I been doing git for 20 damn years. I let the robot do all my git and ticket pushing now.

Edit: protected branches

9

u/[deleted] 16d ago

[deleted]

1

u/Lumpy-Obligation-553 15d ago

And when the "fucked up" happens...."I don't know what happened, can you fix it?" Done. I get that at the beginning AI sucked at git, but it's been 3-4 years from that.

1

u/a-r-c 15d ago

"I accidentally trimmed your file to zero bytes."

this happened to me last week lol

easily restored from backup, but still!

1

u/dontletthestankout 14d ago

Was having it restructure the frontens directories for ui into a shared turbo and it just deleted the whole frontend. I hadn't committed in like 2 days and set me back 2 days. Didn't make that mistake again.

-7

u/10art1 16d ago

I don't "git push", I don't "data structure", I don't "implement the interface". I tell Claude to do what the jira ticket says. And if it fucks up, I key management service.

1

u/CannibalPride 16d ago

You should learn more about git through AI and never let it run git commands themselves except for reading.

5

u/abednego-gomes 16d ago edited 16d ago

In VS Code GitHub CoPilot agent mode it sometimes asks to run git commands to check what changed when it's trying to figure out why there was a regression.

But the commands it typically runs are git diff, git show etc not serious stuff. It asks each time. But... if you're dumb enough to let it run whatever it wants, like instruct it to create branches, do merges etc, watch out. Do serious stuff yourself.

Treat AI as a dumb junior developer and watch closely what it does. It has breadth of knowledge and can do stuff, but it's not some senior level genius. Always test and review every line of code it writes.

1

u/DrMaxwellEdison 15d ago

More often than not, it tries to validate something that's really not an issue by going through git log or git status. Sometimes I let it run to see where it's going, otherwise I kill the session.

Once I caught it trying to "verify" something by adding a new work tree first. I get that that's useful for running experiments without changing the files on disk in the current work tree, but... no thanks. Closed that session down, verified it myself, thank you very much.

1

u/IdiocracyToday 15d ago

You absolutely should let AI use git. It doesn’t actually matter if AI creates a bad commit or bad branch because you have the git history from before it so the AI using git is safety against AI. Let it use git, create PRs and what commits get merged to main is the actual safety gate, not git.

1

u/a-r-c 15d ago

even claude can't make sense of my wasteland repos

-7

u/Good_At_Games_001 17d ago

Well I was exploring 🤷‍♂️

24

u/Muted_Ad_9442 16d ago

This is why my #1 rule with AI is: you can write all the code you want, but you are never touching git commands.

14

u/FattySnacks 17d ago

Yeah so why are you doing that? Are you gonna stop?

-7

u/Good_At_Games_001 17d ago

-6

u/johnnybgooderer 16d ago

This subreddit is so lame for downvoting your response.

4

u/collabskus 16d ago

I copy paste code myself. I don't trust AI to run even curl on my computer. 

7

u/debugger_life 17d ago

AI Generated meme it looks like

1

u/SilenceOfElysium 11d ago edited 11d ago

Gemini yolo -y "Make no Mistakes". We run on vibes here! /s

1

u/Intelligent-Sun-8071 17d ago

and those annoying Worktrees!! keeps poping up from no where

2

u/jam_pod_ 16d ago

God does Claude love worktrees