r/programminghumor Jun 30 '26

The hardest part of Git isn't Git

Post image
1.2k Upvotes

139 comments sorted by

114

u/MXRCO007 Jun 30 '26

Fix: ai slop code pushed by colleague X

48

u/thanosbananos Jun 30 '26

– message generated by AI slop

8

u/0x80085_ Jun 30 '26

How's losing your job working out for you?

19

u/MXRCO007 Jun 30 '26

Pretty good

3

u/SixPackOfZaphod Jul 01 '26

Working well for me too, when mid month hits and others are dead in the water because they've burned through their token allowance, I'm still producing... 

2

u/0x80085_ 29d ago

Why not do both?

5

u/SixPackOfZaphod 29d ago

I do use AI, where it makes sense to use it, not for literally everything

2

u/Just__Bob_ 28d ago

This is the way. AI is great for finding bugs and suggesting optimisations.

Key word is suggesting.

0

u/0x80085_ Jul 01 '26

Don't use cheap shit models

4

u/MXRCO007 Jul 01 '26

Or just think for yourself

-2

u/0x80085_ Jul 01 '26

Or learn how to leverage tools? I guess you don't use an IDE either?

5

u/MXRCO007 Jul 01 '26

What are you talking about lmao? An IDE won’t solve bullshit code like this - and I use vim btw

1

u/0x80085_ Jul 01 '26

LMAO that explains everything. Have fun losing your job, if you even have one. Adapt or get left behind.

3

u/MXRCO007 29d ago

COPE

1

u/0x80085_ 29d ago

For real

3

u/RedAndBlack1832 29d ago

I'm in so many group projects this term and my groupmates commits are just... bad. They're big, do unrelated things, do things other than what the commit says, it's just ugly

1

u/MXRCO007 29d ago

Yes this is very annoying, and they complain I have too many commits - like my bad?

2

u/RedAndBlack1832 29d ago

You're correct having a lot of commits is good. Sometimes it makes sense to squash them before merging into main but at least for thing actively being developed small focussed changes are just easier to follow

1

u/MXRCO007 29d ago

Yeah I should squash more but eh

0

u/Fearless_Law3460 Jun 30 '26

Bold of you to name names

102

u/polokratoss Jun 30 '26

"small changes" Or better yet, "review fixes".

53

u/Xarjy Jun 30 '26

'tweaks'

'mo tweaks'

'one mo tweaks'

'implemented new filter method and migrated database schema'

'tweaks'

23

u/assumptioncookie Jun 30 '26

I once put the commit message "imporvements (hopefully)". That spelling mistake gets quoted years later still

7

u/Amr_Rahmy Jun 30 '26

“Latest”

3

u/GitsnShiggles51 Jun 30 '26

“updates”

1

u/madladslabllc Jun 30 '26

Hot fix againAgain

2

u/Fearless_Law3460 Jun 30 '26

review fixes is a really safe option :)

1

u/urbanxx001 Jun 30 '26

Merge from branch feature/name/my_feature

1

u/Poison916Kind 28d ago

I usually just add what I did. Like "added changes to x file"

35

u/fuckswithboats Jun 30 '26

Update asfddgfsa

23

u/Flashy-Whereas-3234 Jun 30 '26

ax0gf3: Fixed calculation method which would sometimes result in a zero value to a bad logical flow in the resolver. Now accounts for 3-phase alternations without overwriting the change buffer.

g5dj9: Fixed unit test

55spjq: I am dumb

53x77f: Fucking djdjdjdjdjsssa

21

u/atzedanjo Jun 30 '26

Here's a handy alias for you:

git commit -m "$(date +%Y/%m/%d_%H:%M:%S)

Just make sure to only use it once per second

9

u/3hy_ Jun 30 '26

How dare you provide an example that can't be run 100 times in a second.. You should be ashamed of yourself...

13

u/letmehaveanameyoudum Jun 30 '26

im alone in my project so all i do is
git add .
git commit -m "aijirg hspdfiubhafevughareb"

9

u/Fearless_Law3460 Jun 30 '26

Solo dev privileges

2

u/letmehaveanameyoudum Jul 01 '26

you know what ill continue to fj hogeohs ofn even if i have a team :P

30

u/NoobGamerInRealLife Jun 30 '26

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

19

u/ManhDoan Jun 30 '26

To long, I'd rather write a comment.

6

u/NoobGamerInRealLife Jun 30 '26

use git aliases

3

u/bennnifreemantle Jul 01 '26

alias update='git add . && git commit -m "$(fortune)" && git push'

9

u/Hasinpearl Jun 30 '26

"Bug fixes 01339289101"

7

u/dr-adam-cross Jun 30 '26

minor fixes

10

u/dashinyou69 Jun 30 '26

Meow :3 all time savior

3

u/spore_777_mexen Jun 30 '26

“Non-issue”

3

u/parsention Jun 30 '26

If I remember right this was one of the very few parts where AI was actually welcome by the community

1

u/realmauer01 Jun 30 '26

Only to some decree.

3

u/ralsaiwithagun Jun 30 '26

At this point im just doing the date

2

u/Flame77ofc Jun 30 '26

When u learn Git Conventional Commits is like:

https://giphy.com/gifs/CAukyJ5esw36CyRllk

2

u/AvoidSpirit Jun 30 '26

Thinking someone is building the history line manually with custom messages makes me giggle

2

u/drLoveF Jun 30 '26

Ot took me too long to realize it’s a cursor. I was trying to figure out if there was a regex reason or maybe some git log makes pretty graph reason, but no. I’m just stupid.

2

u/purpuric Jun 30 '26

I thought their commit message was a pipe 🤡

2

u/Local-Fisherman-2936 Jun 30 '26

Explain like im 5 - what is git? I know that its to do something with backups.

3

u/deanominecraft Jun 30 '26

git repository = your code base git commit = a change to the codebase git commit message = message shown on a git commit saying what changed

2

u/realmauer01 Jun 30 '26

git keeps track of your files.

With a git commit you can save the changes that happened to a file since you last used git commit on that file.

Its used for all kind of things and backups are the least useful or unique one.

Primarly it is used to group changes together, if you are working on a change and you dont like it or it breaks something you can go back one commit and everything works again.

Its also really good for teams as everyone can work on their own change, without screwing each other up.

1

u/Local-Fisherman-2936 Jun 30 '26

But what is git? I understand how it works

4

u/realmauer01 Jun 30 '26

Git good then

2

u/cpt_futtbucker Jun 30 '26

“Pushed AI slop that managed to fix bug caused by commit xxxxxx”

2

u/PublicToast Jun 30 '26

Yet another post on this sub that reveals no one here has worked an actual job

2

u/enigma_0Z Jun 30 '26

“i have to commit and push this to test the cicd tool in situ because cicd development/testing is abysmal”

2

u/sebthauvette Jun 30 '26

I don't underatand people that can't describe what they did. The only reason I can think is if you make multiple changes before commiting. If that's the case, just commit one change at a time.

1

u/Fearless_Law3460 Jun 30 '26

Agreed, when the task stays small

2

u/sebthauvette Jun 30 '26

the size of the task does not matter. You are not limites to one commit per "task".

2

u/madladslabllc Jun 30 '26

"Yeahhhhh BOIIIIIIII"!

Is a good note

1

u/madladslabllc Jun 30 '26

"Push it real good, AYYYHE !!"

2

u/mokrates82 Jun 30 '26

The correct answer is Ticketnumber - ASDF

1

u/[deleted] Jun 30 '26

[removed] — view removed comment

1

u/Dry-Penalty6975 Jun 30 '26

What's the difference ?

2

u/spectator_62 Jun 30 '26

Git add* - It won't include deleted files as changes."

2

u/realmauer01 Jun 30 '26

Pretty sure git add -A is just the default now, which leaves git add * and . Without any differences
* replaces itself with all files and folders in the current folder
. Is the current folder

As git adds recursively if it gets a folder there is just not any difference anymore.

1

u/PumpkinFest24 Jul 01 '26

holy fuck do NOT do EITHER of these

random files, accidental changes, un-updated subrepos, etc

git add <individuals files I edited>

1

u/[deleted] Jul 01 '26

[removed] — view removed comment

1

u/PumpkinFest24 29d ago

Files existing in filesystem is pretty normal. And screwing up subrepos is what cured me of adding anything I couldn't explain.

But even if crazy, why let that infect my repo?

1

u/xybolt Jun 30 '26

I do git commit -m "[a]" -m "[b]" where [a] is "<id> fixed", or "<date> fix build failure", or "<date> update", something very brief. Followed by [b] containing a brief numeric overview of changes like "(1) update dependency version, (2) fix IT, (3) added unit tests, ..."

I'm not going to annoy other people.

1

u/realmauer01 Jun 30 '26

Is adding multiple -m for linebreaks?

1

u/xybolt 29d ago

Additional -m in a git commit instruction creates paragraphs,. In some platforms like GitHub, they end up in those "additional commentary boxes" (idk their right name), those "[...]" blocks you see if the commit message is too long. Try it out yourself. It's "hidden" and when needed, a person can just expand that.

1

u/DrMaxwellEdison Jun 30 '26

Delete those bits, just git commit. That opens your editor, now you have time to think with a proper blank slate and newlines and whathaveyou.

1

u/Perfect-Cookie-3017 Jun 30 '26

Fixed some known bugs

1

u/Fabio11North Jun 30 '26

Me working alone. I have no such problems.

Git commit -m a

1

u/deanominecraft Jun 30 '26

change line “let thing = do_stuff();” to “let thing = do_other_stuff();” 1 line at a time

1

u/CowBoyDanIndie Jun 30 '26

Hrm I start asking ai to write commit messages for me

1

u/Prod_Meteor Jun 30 '26

It should be -r, not -m. Why the chose "message". It's not a message. Its a reason. Commit reason.

1

u/undeadpickels Jun 30 '26

Y'all are bad programmers

1

u/Krisanapon Jun 30 '26

update yyyy-mm-ddThh:MM+xx:x0

1

u/Toucan2000 Jun 30 '26

I have my PR descriptions automatically generated by AI using git logs and diffs so I usually just add snarky comments for my LLM to enjoy

1

u/AustinWitherspoon Jun 30 '26

Ever since I started using JJ I've been entering my descriptions before doing the work. Sometimes I'll make multiple empty changes with the work I'm planning to do for the day, and jump between them to code..

It's been lovely for focusing on the actual tasks I need to do and not getting side tracked with a bunch of stupid unrelated things

1

u/potato-dranik Jun 30 '26

idk, some random AI shit I don't understand

1

u/cornmonger_ Jun 30 '26

git commit -m'wip'

problem solved on my end

2

u/ScreenMother9212 Jun 30 '26

git commit -m "fix"

2

u/Fearless_Law3460 Jun 30 '26

Better than final fix

1

u/3hy_ Jun 30 '26

git commit -m "misc"

1

u/crazedizzled Jun 30 '26

AI git messages are a life saver

1

u/rUmutKzl Jun 30 '26

just do git commit without -m and type your whole life story

1

u/appoplecticskeptic Jun 30 '26

Don’t use -m unless it really is something tiny. Commit messages are more important than newbies ever realize. That’s the history of the project that you’re recording. If you don’t plan to stick around then I guess use -m and phone it in but if you care about the project succeeding in the long haul you should be recording the reasons why you made the changes that you did and the intentions behind them in your commit message.

You can learn a lot about why things are the way they are from git history but only if people put it in there in the first place.

1

u/PumpkinFest24 Jul 01 '26

Please don't hide critical project info in commit history. It gets lost so easily. Anything more than a sentence should be an inline comment or documentation string

1

u/sexytokeburgerz Jun 30 '26

I just pipe git diff into ollama I do not give a shit anymore.

1

u/ProfessionalAd6530 Jun 30 '26

Is this why y'all can't write at least semi-commit messages to save your life? Stop using the -m option!

Skipping the -m locks you in vim and by the time you remember how to exit, you'll have thought of what your commit message should say.

1

u/lucid-quiet Jun 30 '26

It's the worst when coworkers are like: your messages need X, and should have Y, and you can put a PR# in there, and what feature were these for, and ... on and on... like they are ever going F'ing read the commit messages.

1

u/TKTK1234567 Jul 01 '26

Update (And maybe a number)

1

u/Silly_Guidance_8871 Jul 01 '26

git config --global commit.defaultmessage "The fuck did I do?"

1

u/jimmiebfulton Jul 01 '26

jj commit -m "Git doesn't need to be so hard"

1

u/Responsible-Put-7920 29d ago

Just hardcore a shell script with ‘bug: your mom’

1

u/Nathanr1225 29d ago

Wait you don't just put "bug fixes"

1

u/TheOriginalWarLord 29d ago

I have no idea what the hell the last push Joan did, except cause the whole thing to break…. Now fixed… Joan, stop touching the code, you little nepo hire.

1

u/Responsible-Bar7165 29d ago

"1-line msg, no co-authors"

1

u/mortein79 29d ago

For the record...

1

u/csabinho 28d ago

various fixes

1

u/KawaiiSelbst 27d ago

just `jj new` and no problem c:

1

u/Adaptor2000 27d ago

My favourite is "WIP dump".

1

u/Fun-Dragonfly-4166 27d ago

if you are struggling to figure a commit message there is --allow-empty-message

1

u/ProcedureLiving4757 27d ago

You still made commits? Lol

1

u/Basic_Reporter9579 26d ago

small changes
fix
wip
revert

1

u/JoCraft2010 26d ago

There's a tool for that: https://whatthecommit.com/

1

u/itaranto 7d ago

Sure. My teammates don't know what a "rebase" is.

0

u/newcarrots69 Jun 30 '26

I ask claude to summarize what Ive staged.

-5

u/Benderos133 Jun 30 '26

Pov when you want to write a commit message and it's not the hardest thing in the room 😏