r/ProgrammerHumor • • 20h ago

Meme letsMergeThemAll

Post image
4.6k Upvotes

275 comments sorted by

840

u/purpleburgundy 19h ago

I WISH all of my coworkers broke down their tasks into dedicated feature branches. Merge them all into release branch, this is business as usual stuff, what's the controversy here.

442

u/agfitzp 18h ago

The young pups are afraid of branches and merging.

82

u/PixelatedGiant 17h ago edited 17h ago

It really depends on how long PRs take. If they take fairly long even for small changes you end up with tons of busy work dealing with merge conflicts in both develop and release. I am a lead with 10 YOE and I dread it when the number of branches grow beyond a certain point, 17 would be twice what I'm comfortable with.

Sprints are generally 2 weeks and that's already almost 2 per day. Our tickets aren't anywhere near that small so it rings alarm bells for me. Nevermind that OP clarifies that the branches are stepping on each other, so it's even worse than I imagined.

80

u/ADHDebackle 17h ago

That's less of an issue with time and more of an issue with atomicity.

That said, folks should rebase before merging up. If you have merge conflicts it's just a sign you need to rebase again and rerun your tests before merging.

17

u/PixelatedGiant 16h ago

develop and release can deviate enough that you have 2 separate sets of merge conflicts to deal with. Rebasing can only deal with release assuming that's what your feature branch is based on. Unless you want to open a whole other PR to merge release into develop during the sprint. This is the busy work I'm talking about.

26

u/ADHDebackle 16h ago

I can't tell how you use those branches based on the names alone so it's hard to comment on that workflow.

In general what I do is every story happens in a feature branch, feat_xxxx that gets rebased on dev just prior to code review, then merged into dev branch after review. At various points in the sprint, dev is merged into QA for testing. At the end of the sprint, QA is merged to prod and deployed.

If that workflow is followed, and rebases are done correctly on the feature branches, there should literally never be a merge conflict anywhere in the system. There should be no situation where a change gets to qa or prod without first going into dev. Even hotfixes will follow that path.

6

u/PixelatedGiant 15h ago

Any time a team mate merges to develop or release there is a chance for a conflict or a need for a rebase assuming your feature branch was opened before they committed their work. Especially if there are structures that everyone generally needs to modify. It's outside of your control beyond finishing tickets faster than everyone else.

7

u/ADHDebackle 12h ago

Yeah the strategy is just to confine your rebases to the feature branch. Personally I also like to squash merge features to keep things tidy.

→ More replies (4)

4

u/SquirrelGuy 13h ago

I don't think I understand how there would never be merge conflicts in this workflow? If two feature branches touch the same code, one of them may still have to deal with merge conflicts, no?

9

u/ADHDebackle 13h ago

Those would be taken care of during rebase in the feature branch (whichever is finished second) Technically you could call those merge conflicts but it doesn't really happen during a merge. Once the rebase is complete the code going to review should already be conflict free.

2

u/MindCrusader 15h ago

Wait, how do you do hotfixes like that? If you merge hotfix to dev and then merge dev to prod, you might be relasing not ready content from dev into the production. Am I missing something? We normally merge hotfix to prod and then can rebase dev based on new prod with hotfix

3

u/ADHDebackle 12h ago

Ooh sorry - Hotfix is a separate branch parallel to dev and goes to qa which merges into prod. Every time prod deploys it's merged down to dev. There is a risk of merge conflicts in that workflow when merging down on a hotfix but it's generally an exception to the rule.

1

u/Messy-Recipe 3h ago edited 3h ago

Hotfixes can be a weird one with this flow because you might need to get something out to customers ASAP on like, a versioned/tagged prior release, and by that point the master/main/dev/whatever has moved onwards.

But I suppose there's not really ever any good solution under any system for that; ultimately it boils down to 'we must emergency fix the outdated release code right now...' -> '...then figure out how to integrate it with the up-to-date live-development branch', since the latter isn't customer-facing immediately

I've only ever seen hotfixes be based off the actual release tho, like you checkout the tag or named release-version branch, & make the hotfix branch from there

IMO then you should always cherry-pick hotfix commits to a new branch to merge to the live dev branch, because under some systems, release branches can get automated cruft commits from tooling/versioning/etc, and you dont want those merged over to main/dev/etc, which would happen if you merged the hotfix branch to BOTH its parent release branch & also to the dev one

4

u/gmes78 4h ago

Why would you ever base your feature branches off a release branch? If it'll be merged into the develop branch, it should be based off of that.

1

u/PixelatedGiant 4h ago edited 4h ago

By branching off of release my changes get tested in isolation. Develop is inherently unstable and may affect the results. Develop is not representative of the near-future. It could be testing features that will only be enabled several releases from now.

I'm working on an application that runs trade simulations that are built up in steps. Changes I make to a step can have cascading effects. It's important to establish a baseline. It's ironically more representative of what is in production since develop may have features under long test cycles that affect results.

tl;dr I'm testing both the immediate and far future using release and develop respectively.

1

u/friebel 14h ago

Are you cherrypicking from develop to release or how do you get those merge conflicts?

2

u/PixelatedGiant 12h ago edited 12h ago
  1. Branch feature/my-feature from most recent release/X.YY branch.
  2. Do work.
  3. People commit stuff to both develop and release/X.YY in the meantime. Some stuff is develop only, for multiple sprints.
  4. Finish work. Open PR to merge feature/my-feature -> develop. By this time both develop and release/X.YY have changed and we have merge conflicts in both, sometimes for different reasons.
  5. Finally get 2 approvals to merge to develop. It spends a few days getting tested.
  6. See a repeat of Step 3.
  7. develop is signed off on and I must deal with opening a PR to feature/my-feature -> release/X.YY. I need 3 approvals, 2 from the original developers who approved the PR in step 5 and additionally a BA or QA who signed off on testing.
  8. The release is promoted to a QA environment where it undergoes an additional 2 weeks of testing. If any issues are found it turns into a hotfix at this point.

Creating a hotfix is the only situation where I may need to cherry pick. But that doesn't happen too often and isn't the source of 90% of my troubles. It's other people modifying the long lived branches while I work. There are certain files that see frequent edits.

1

u/ADHDebackle 12h ago

Why do you make a separate branch for each release version?

Like isn't release/1.1 intrinsically part of the history of release/1.2?

Also curious why stuff lives in develop without going to prod across sprints. Surely anything in there could be hidden behind a feature flag if it takes multiple sprints to implement.

1

u/PixelatedGiant 12h ago edited 11h ago

Why do you make a separate branch for each release version?

Like isn't release/1.1 intrinsically part of the history of release/1.2?

I suggested they delete them since we have tagging. But that's seen as "production" and the audit team pushed back on it, not worth the fight. Plus those branches are protected so there would need to be a whole separate process created to have them automatically deleted. I'd have to fight for time to get that done and there are just so many more important things to do. It would sit in the backlog for an eternity even after being given a green light.

The branches exist as they are for auditing and permission control purposes. They are filtering based on the release/, feature/, hotfix/ etc. prefixes.

2

u/wobblyweasel 14h ago

you merge you have a single commit that may have bugs.

you rebase you have a whole commit history that is not tested and may have bugs and maybe commits that won't even compile.

3

u/ADHDebackle 13h ago

You rebase and squash merge your feature beanches. You never rebase your core branches like dev, qa, or prod. Your feature branch should be a single commit. Of course that requires that you break down your stories well to small atomic, self contained deliverables.

If QA finds a bug your tests didn't cover, that comes in as a bug ticket and is treated as a new feature branch.

1

u/wobblyweasel 12h ago

not sure what stories and deliverables are. I just want a good history and I can't imagine all my feature branches being single commits. a feature may have related but different things, may have been done in steps, etc

2

u/ADHDebackle 12h ago

Well features should be small and atomic deliverables. A story is just a description of the work that needs to be done. A deliverable is just a complete testable unit of work.

If your feature has related but different things, it's probably more than one feature. In the way I am using the term, a feature branch contains the implementation of the smallest unit of testable work for a piece of functionality. 

In that context, a single feature might be a single get endpoint, a piece of the UI, or even a small backend service that will be used for a larger deliverable (sometimes called an epic)

1

u/wobblyweasel 7h ago

I see, well, I still don't see how I can get away with a single commit. on my latest feature branch, I changed an app option to support new functionality, which included among other things:

  • changing the option itself to support a subset of x
  • changing it to support a wider subset of x
  • migrating the stored settings
  • extracting and translating strings

now could this be one commit? sure, but having many is easier to review and understand and when you look back at history it's just there

but splitting this into separate branches, idk how I would do that

1

u/ADHDebackle 1h ago

It's hard to say without more specific details, but it's a good example of how writing good user stories and breaking work down in a way that's cleanly divisible and atomic is a really important skill set. I feel like about 30% of the work I did in software development was just figuring out the right ways to organize and split things up.

As far as review, though, you can go to code review with all your story commits rebased on the base branch. The squash merge happens after review so that the completed feature goes in as a single commit. That makes it significantly easier to revert a change if necessary later on down the line because every commit is a fully encapsulated unit of functional work.

→ More replies (0)
→ More replies (4)

4

u/Theguest217 12h ago

you end up with tons of busy work dealing with merge conflicts

You? You mean Claude?

1

u/PixelatedGiant 12h ago

I don't trust AI enough to give it that kind of task, either way it's a bother.

1

u/Romeo3t 12h ago

Single trunk crew rise up! This is our time!

9

u/KrikosTheWise 15h ago

Here I am only being afraid of rebase. Maybe that's really just a fear of VIM

2

u/agfitzp 15h ago

<esc>:wq!

2

u/KrikosTheWise 15h ago

That's the only one I know!!

3

u/agfitzp 15h ago

Just be glad they finally made the cursor keys work so you don't have to memorize control keys from the dawn of time.

2

u/Neocrasher 14h ago

Arrow keys are nice but hjkl aren't that bad.

1

u/agfitzp 13h ago

Yeah well... Even my iPad keyboard has cursor keys so the whole pretending to use a vt100 keyboard in the 21st century is mindbogglingly stupid in an era when we have two full sets of cursor keys even on a 10$ keyboard.

Edit: shit... even the vt100 had cursor keys.

1

u/AlterTableUsernames 11h ago

I have more difficulties of finding which files still hold conflicts and remembering which changes are from which branch.

1

u/Messy-Recipe 3h ago edited 3h ago

protip use Ctrl + [ instead of escape. no stretching!

also x subs for wq -- and you dont need the ! if youre writing with w before quitting with q

(it will force WRITE as well as quit but that generally wont come up...)

1

u/338388 1h ago

I've remapped capslock to esc to avoid stretching. Not like capslock is ever used anyways

Bigger protip tho is that you can make git merge conflicts use an editor of your choice with core.editor config.

1

u/Theguest217 12h ago

You can configure git to open VSCode or some other editor instead.

6

u/spikernum1 8h ago

One branch per file please.

1

u/jmflyers 10h ago

I see the opposite here. All the old timers hate forking off of branches. We have master, and we have "feature/[Jira number]" that gets PR'd into master.

The new grads are the only ones who use Git correctly and the rest of us look down on them because they are being try-hards lol

→ More replies (4)

34

u/Extreme_Wish_553 19h ago

Yeah. 17 tickets. 17 branches. Great.

46

u/rabbit_wizard 19h ago

Maybe I wasn't specific enough. What you're defining is the normal behavior. Imagine this for 3 changes, some rebased correctly , some incorrectly.

57

u/juanfnavarror 19h ago

Also, +4000 -4000 line changes that nobody has fucking time to test

14

u/ycnz 18h ago

How did you get them to break it down so small?

6

u/zzulus 18h ago

Yeah, rookie numbers, right? Mine usually start at mid-teens.

10

u/CryonautX 18h ago

I am confused what rebasing has to with too many feature branches.

6

u/rabbit_wizard 18h ago

The idea that Copilot pushed different variations of a few features with unsuccessful attempts to rebase / resolve conflicts. A single dev would usually try to keep changes in separate branches but in sync with his/her own changes, especially when working on with code in close proximity.

16

u/B1anky 18h ago

If a dev knows their changes would affect another branch's work they really should be targeting the previous work's branch during development, rather than having to deal with N-many branches being merged into an integration branch at the end. The rebasing should be handled on their feature branches, rather than be a surprise at the integration branch merge. Are people just making N-many feature branches off of like main and touching the same files and then yoloing the merge at the end???

2

u/rabbit_wizard 18h ago

Yes because copilot handled each independently, in parallel :) again this is a hypothetical meme

5

u/B1anky 18h ago

Ooh gotcha lmao

3

u/thisguyfightsyourmom 17h ago

Just a bit of shit posting, wouldn’t be programming humor without dumping on modern development blindly

23

u/purpleburgundy 19h ago

meh, you sound junior. This is reddit so no harm no foul, but I wouldn't share this with people you know at work.

Not even a Claude Copilot issue at all honestly - set up your repo so all checks must pass before merging is allowed, reviewer approval required as one of the checks. Then either auto merge or manual merge or copilot merge or who cares what merges so long as the checks pass. If there are merge conflicts then just let copilot do it, it will prompt you for input if there is any ambiguity.

Git is great specifically because of what you're describing. It give some management to the chaos of parallel work.

it's 4pm, check out, bye, no stress. If anything Claude Copilot disappears all the merge conflict pain imo.

→ More replies (4)

1

u/blasian21 16h ago

Merge commit to get up to date then squash on the merge back?

2

u/FrozenHaystack 15h ago

How often do I wanna do that and my colleague is like "Nah, then we have more tickets, just put it all in one ticket."

1

u/mothzilla 15h ago

All the cool kids git push -f to main.

1

u/InfiniteAd7548 4h ago

Come one, if you are not doing Feat/whatever. -30 commits And try to merge that to main with commits like: "Some bugfixes".

Are you even trying?

→ More replies (4)

150

u/stormdelta 16h ago

This sub's always had a problem with bad jokes that don't make sense, but it seems like it's gotten a lot worse lately.

A lot of these feel like they're made by people who have no idea how git works or how to use it.

73

u/ListerfiendLurks 12h ago

Right? The OP described exactly how git is SUPPOSED to work.

9

u/emu_Brute 11h ago

You do want to minimize feature branches though.  Merging 17  feature branches for a release is how git is designed to work, but not how you're supposed to use it.  

Ai can only do so much with merge conflicts

20

u/ListerfiendLurks 11h ago

It depends on the amount of work being done. Every FAANG and FAANG adjacent I have worked at demanded PRs be broken up into multiple smaller feature branches if they got too big.

5

u/Theron3206 6h ago

I routinely merge that sort of number, maybe 10% of them have non trivial conflicts. We just group work on the same part of the core base as best we can.

It's a nearly 30 year old pile of anti patterns too, not some pinnacle of modern design principles.

7

u/jordanbtucker 11h ago

Right, I saw a post the other day about someone complaining about how git works great until two people want to work on the same file at the same time.

That's exactly what git was designed for. It's a "Distributed" Version Control System for a reason.

3

u/Tensor3 14h ago

You're right, but I think we all understand that OP is saying AI created a git history they don't like.

5

u/DJDoena 5h ago

people who have no idea how git works or how to use it.

Isn't that everyone except Linus?

3

u/KevlarToiletPaper 12h ago

Take it easy, most posters here, like OP just had their first IT classes and they just talked about git. Let them have their fun.

1

u/Head-Bureaucrat 3h ago

I was about to reply: that happened on a team I was on well before AI? Like... Fucking git flow is a thing, and it makes me super sad.

51

u/apt-maintenance 19h ago

git push mistakes -no

25

u/Tim_TheDude 15h ago

Me who uses git for years and all I do is checkout/commit/push and rarely I somehow resolve a conflict

https://giphy.com/gifs/H5C8CevNMbpBqNqFjl

967

u/GildSkiss 20h ago

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

67

u/Bubbaluke 19h ago

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

38

u/spicybright 17h ago

WELP, time to re-clone the whole repo!

34

u/throwaway85256e 17h ago

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

6

u/PrincessRTFM 17h 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 16h 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 13h 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.

8

u/TwoAndHalfRetard 17h ago

git add .

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

git push -f

5

u/elementslayer 17h ago

Why two commands. Just commit -am

→ More replies (4)

1

u/Foorinick 14h 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 12h ago

You were almost there

Git pull

Git checkout -b feature/something

Repeat

1

u/Foorinick 8h ago

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

51

u/TerminalVector 18h 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

13

u/adabsurdo 17h 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.

7

u/Crad999 16h 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.

4

u/IceTrAiN 14h ago

20 year SWE here... What the fuck?

10

u/TerminalVector 16h 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 14h 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

5

u/TerminalVector 14h 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 5h 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...

236

u/TheModWhoShaggedMe 19h ago

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

<sippy cup>

16

u/perestroika12 16h 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

3

u/theFirstHaruspex 18h ago

You got it 😌

14

u/RedditName9000 18h ago

seriously, we had more than a few fire drills because somebody did a bad merge and needed someone senior to unravel the damage. Now anybody can just ask an AI to sort out the rebase, It's sort of sad and nostalgic that I may never help a junior fix their bad merge again. If I'm lucky I'll see a really severely botched attempted repair of a merge conflict by a misinformed AI, that'll be fun.

20

u/tragiktimes 18h 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.

5

u/spicybright 17h 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 13h ago

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

6

u/PrometheusZero 18h ago

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

19

u/rabbit_wizard 20h ago

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

2

u/theycallmeJTMoney 16h 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 18h ago

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

1

u/DMoney159 15h 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 4h 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.

→ More replies (1)

97

u/zzulus 19h ago

Hold on, people actually use Copilot?

108

u/xaervagon 19h ago

The Copilot in Visual Studio is a wrapper for the other AI agents. It's surprisingly decent

51

u/HTTP_404_NotFound 19h ago

*Github copilot, specifically.

To the original poster, since you can use the claude agent / models with it, well, it works quite nicely. Can also build custom agents with it. Use whichever models you want.

Github copilot is NOT the same as "copilot" or "microsoft copilot".

I'm sure, a lot of the code is shared, but, they are not exactly the same. Github copilot is pretty good.

Though- for the above commentor- I will say- VSCode's integration just blows visual studio out of the water. More lightweight too.

Though, if I'm actually writing code, its hard to be visual studio. But, for bug fixes, small features, etc.... vscode works better here.

9

u/Schnickatavick 18h ago

It's a similar distinction between Claude and Claude code, they're very different products intended for very different audiences. You really shouldn't be using the generic Claude website for coding, and you really shouldn't be using Microsoft copilot if you're a person with self respect for coding either.

3

u/HTTP_404_NotFound 18h ago

While I use claude code personally either via its linux app, or vscode plugin, and do agree, that it is BY FAR superior to anything copilot- (Edit- or micro-slop in general....)

Those of us who work for companies do have to roll our eyes at the business processes of where it has to travel through legal... contracts... finance.... etc, which sadly, in some companies can take a very long time.

Meanwhile- we also have to justify the price for it, which is quite funny, as it will likely cost LESS then m$osft copilot, while producing better results too.

SO....

and you really shouldn't be using Microsoft copilot if you're a person with self respect for coding either.

Its not a matter of wants- its a matter of, if I go swipe the company card, purchase and use Claude, I'm going to have Legal, HR, Contracts, Finance, Compliance, Security coming to find me... and I'll be looking for a new job tomorrow, cause, company policy, ofc.

2

u/Tiny-Plum2713 16h ago

Claude costing less than copilot? You should see the bills in large sw companies lmao

1

u/HTTP_404_NotFound 9h ago

Lol, I don't want to. I... already see and answer for the copilot bills, and well...

Its cheaper then more heads, i guess.

2

u/DaniilSan 17h ago

I dunno. Maybe because I use it with WSL, GitHub Copilot is stupidly slow when compared to Claude Code or Antigravity CLI (and Gemini CLI before it got killed).

2

u/x_typo 18h ago

decent

the key here...

1

u/heavy-minium 18h ago

An AI model without a harness isn't an agent. It's the harness that makes it into an agent. So calling it a wrapper for other AI agents is incorrect.

→ More replies (4)

15

u/mindsnare 19h ago

I assume they mean GitHub copilot

5

u/HRApprovedUsername 19h ago

I like GitHub copilot but the copilot inside teams sucks

3

u/x_typo 18h ago

copilot inside teams sucks

Had someone asked me this: "how to do 'machine learning' with Microsoft Copilot? "

Me: "that's the neat part. you dont... "

2

u/HPUser7 18h ago

Copilot cli is actually pretty great. Let's you swap between claude and gpt effortlessly. It's auto model selector is good for a decent number of tasks.

1

u/jordanbtucker 10h ago

GitHub Copilot. Not Microsoft Copilot.

Yes, they're both Microsoft products, but the GitHub one is way better for code.

→ More replies (1)

11

u/Nixinova 12h ago

Um, That's normal? You merge them using this thing called a PR...

23

u/cheezballs 13h ago

Wait... What's the alternative? You guys just push all your shit directly into release?

33

u/50_procent 19h ago

This feel like a joke a llm would make. It does not really make any sense but it contains some random programming terms/scenarios so then its humor?

3

u/nazgulonbicycle 18h ago

Thats not how worktrees work

→ More replies (6)

20

u/HallAltruistic519 19h ago

How TF is this still a problem when we have the "Squash commits and delete source branch on merge" checkbox? Are y'all restarted

→ More replies (9)

14

u/Orio_n 4h ago

Each feature gets a separate branch whats so controversial about this? Op is unemployed for sure

→ More replies (2)

33

u/WilmaTonguefit 19h ago

I'm still very selective about what I let AI do. Fix my method to remove potential memory leaks? Fine. Push to git? FUCK NO

16

u/Tiny-Plum2713 16h ago

I could understand this in 2025 but a lot has happened since.

4

u/mothzilla 15h ago

Code in 2035 will be written on punch cards.

1

u/Messy-Recipe 3h ago

git push & all similar/wildcarded things went on my blacklist immediately when we got claude code licenses

that said it's very efficient at doing complex commit reworks & reorders. I've always been a stickler for like, having each of my commits being an independent & coherent unit of work that is fully functional on its own, even if there are several in a branch. and I chronically swap tasks and like to do multiple things at once

so I make extensive use of fixup+autosquash, amend, multiple local sub-branches & cherrypicking, reordering things in history etc. and having that kinda stuff in my global instructions then telling it to do it actually works surprisingly well, I guess because it's something with a deterministic / clearly-correct desired end state

only locally of course, fuck if it gets the chance to mess with anything I dont have in my local reflog. But it's nice to be able to just vaguely be like "update that commit with the fix for XYZ, split off the changes for THING into a new commit but stick it here in the history since thats the logical progression, then fixup the remaining commits with ABC' and it just does it, no multi-line editing a big list of commands to then chain together

→ More replies (23)

18

u/Ok_State5255 16h ago

I used to be the release lead for a major company. We had 16 developers split over 4 teams going into on production org.

The amount of ignorance surrounding Git was always astounding to me. I'm a pretty stupid guy (I once pulled a cast iron skillet out of the oven without remembering to grab a potholder. That was...painful), but you really only need to remember like 8 commands to do 99% of the work.

Nope, instead we have shit tools like Copado and Autorabit because people believe it's easier to point-and-click your way through. And I would have to clean up the inevitable messes.

Watch a 30 minute youtube video. Fuck up a commit...okay! You can revert it. Fuck up your branch? Start a new one and recommit!

It's designed to be easy. Somehow we all lost sight of that .

9

u/Groentekroket 15h ago

What is wrong with a GUI for Git? I always use the IntelliJ Git interface and 1 only need to use the CLI like once a year. Everybody squashed their branches and rebases on main. We make sure we don’t pick up stories that interfere with each ofher and we never face any problem. 

2

u/visualdescript 14h ago

If you're squash merging, what's the point of rebasing on main, just merge main in whenever you need to?

5

u/Dancing7-Cube 13h ago

this drives me nuts lol, sometimes I'll get a stickler that refuses to approve until I clean up my commits, even though it squashes

like who cares, unless the PR is 10k lines, read the diff, the commits are basically just checkpoints in case my laptop SSD randomly dies

1

u/LegendaryMauricius 13h ago

git conflicts can be painful when they're with main, with several other feature branches already being merged there.

2

u/visualdescript 9h ago

How does rebasing make the conflicts any easier, you're still going to have to resolve them

1

u/LegendaryMauricius 3h ago

Because you can resolve them one by one, by changing only the branch you want to merge. It does feel wrong though. If there's another way, please tell me lol.

3

u/Foorinick 14h ago

I mean, I've been trying to learn how to git properly but thw only place i found digestible information was unironically by asking ai on how to do it properly, but even then there are so many different things you have to understand and git barely explains or links anything to explain how one might unfuck themselves

1

u/LegendaryMauricius 13h ago

git command is definitely designed stupidly though. The system should be easy, but it's also easy to end up in a git specifics rabbithole because something got fucked up either by a bad command or some remote communication bug.

14

u/Bomaruto 18h ago

Please use Claude to help you write better jokes.

→ More replies (1)

5

u/akshay-nair 15h ago

With commit messages like:

Adds whatever feature

...10 lines describing what the 5 lines of diff do.

1

u/Disallowed_username 15h ago

I think you dropped 2 times 3 zeros in flight. 

6

u/dallenbaldwin 10h ago

10, 1000 line PRs are much easier to hand review than 1, 10,000 line PR, even if it feels like it takes longer...

3

u/CM375508 11h ago

... That's a methodology problem not an ai problem.

Even hand drawn code should follow gitflow

Features to a develop branch. Release cut to main.

But yes. Ai having git control will burn you sooner or later.

14

u/[deleted] 14h ago

[deleted]

6

u/razor_train 14h ago

I'm using Claude for some code generation, but it is absolutely forbidden to do any git command that changes anything. It's also forbidden to run the test suite since burning tokens for that is epically stupid. Granted I'm a dev team of one (human). My coworker challenge is that he developed massive piles of utter shit code, then git committed them all in one go (then took early retirement and left me with the dumpster fire).

3

u/LegendaryMauricius 13h ago edited 3h ago

Do you deny such commands with some settings? I actually told it in the .md to never use git commands and rather 'remind' me of doing them myself. I know the risks, but it was more of my preference. Sadly it lately started to use them and apologize to me after the fact, although it's usually commands that help it understand the code.

2

u/hw999 9h ago

Wrap your agents in a tool like nono.  It let's you define kernel level restrictions on the file system and the network.

1

u/LegendaryMauricius 3h ago

I'll look at it.

1

u/real_keep 14h ago

Sorry but skill issue bro. You absolutely can and should let Claude run git commands if you're riding him like the steed he can be

No but seriously, if AI tools keep getting better at this rate, these tools will be more trustworthy then yourself using git, so you may as well learn to use them right. At your own tempo ofcourse.

5

u/LegendaryMauricius 13h ago

I don't let it use git (usually) specifically because commiting helps me understand each change and I don't like it publishing in my name. I don't understand why anybody would want AI using version history and publish changes without them knowing the whole history of your own program.

4

u/razor_train 13h ago

so you may as well learn to use them right

"right" is relative to the dev workflow model and the people involved (if any). Plus some of us are actually responsible for the end result, I can't blame Claude if the billing system starts spewing out bullshit invoice amounts. Proper engineering practices aren't obsolete because suddenly a clanker is now involved.

→ More replies (1)

2

u/[deleted] 12h ago

[deleted]

4

u/cstopher89 12h ago

A draft PR...

1

u/MushroomSaute 5h ago

I would sooner kill myself than review the thousands of lines of code an AI generates per day. Instead, because I like life, and like and value the practice of coding, I avoid the problem altogether by simply writing it myself.

→ More replies (2)

2

u/Voidsheep 12h ago

Recent AI models are capable of producing perfectly fine pull requests for plenty of software, in some cases better than decently skilled human developers.

I'm not advocating for not reviewing the code you ship, but if you are going to use AI for software development, not letting it create branches, commits and pull requests seems like a pretty arbitrary line to draw at this point.

1

u/Big_Action2476 13h ago

Exactly! It is so cool that I don’t even have to think anymore.

/s (added because I am afraid…very afraid)

1

u/charactervsself 10h ago

Do you spend a lot of time thinking about git commands currently?

1

u/Big_Action2476 8h ago

lol no. Been using git for 15yrs, that is just baked in. I don’t use ai for anything other than checking my proposed architecture against the docs (that I have already read) to find gaps

1

u/Blotsy 12h ago

There are settings to make sure you never have to push the continue button.

1

u/--LordFlashheart-- 12h ago

I will admit, commit messages are the bane of my existence. So I've a short skill directing my agents what I want in my commit messages and how long I want them. So I will just say commit and get it done. I will also ask it to make a branch from the JIRA ticket. But I would never make a push with an agent, no way

1

u/charactervsself 10h ago

Git commands are the most mundane and unimportant steps in the development workflow. The important parts are good requirements and validation. You’re behind the times, wake up or be left behind.

1

u/exqueezemenow 9h ago

Hey Siri. How to I use a continue button?

→ More replies (4)

4

u/WingZeroCoder 17h ago

I can relate to this…

But at least now they’re finally not working directly on main? 🫠

2

u/HumbersBall 17h ago

I don’t get this joke

2

u/a3dprinterfan 16h ago

Before GH copilot, we had 17 feature branches per release, and now we have slightly more branches... What is the joke?

2

u/dnbxna 11h ago

Is it just me or do all the comments not understand the joke so therefore it's bad

2

u/MrGwinb 9h ago

Well, I'm the same way myself, and so are my colleagues - creating a new branch for each task, the main thing is to merge it later. The problem, of course, is that no one ever goes back to clean up those branches.

2

u/lachlanhunt 9h ago

I would much rather 17 small PRs to review than 1 mega PR. With each PR focussed on a small, somewhat independent, piece of the whole, that makes review a lot easier. GitHub stacks make this flow a lot easier now.

2

u/deadmazebot 39m ago

a good team manager takes responsibility of the team

and many workers would be bad managers

this offloading of work, then saying the AI did it, is still on that worker to review and approve the work they are passing off

but they are crap managers that have self promoted themself to a manager not understanding what they are doing

so just like a standard manager

3

u/amshegarh 19h ago

Copilot W? Doing things the right way?

2

u/Jastafool 19h ago

ew boi, copilot?
Use chatGPT/codex, Claude, LITERALLY ANYTHING ELSE

1

u/Worldly-Stranger7814 16h ago

Grok?

1

u/Foorinick 14h ago

Ah, mechahitler who has a caged heart of gold that keeps trying to escape

2

u/razor_train 14h ago

git add grok/genai/bigtiddywaifywithquestionableagefeatures.mp4

1

u/No-Lime7767 15h ago

But why?

1

u/mountaingator91 18h ago

What like that's a lot?

1

u/Guido125 16h ago

Octo merge go go!

1

u/DontForgetWilson 16h ago

There was a point in time i would have killed to have only 17 feature branches to merge for a release. I probably would have killed to only have 30 branches to merge. Luckily, that PTSD inducing time in my life is no more.

1

u/Maasu 16h ago

Yeah no agreeing with this one, agents are wizards with cli tools and a few simple guidelines.

1

u/Procrasturbating 15h ago

I had a PR will 150 modified code files, large changes get pushed to main directly without a PR because I thought I would let AI do a deploy. I had created a PR, and it just pushed the code around it completely. Le sigh.

1

u/pipedreamSEA 15h ago

Y'all have coworkers?

I'm often the lone dev for a project. And I still properly create a bug or feature branch and send PRs, which I often review myself, for traceability. I'm trying to do away with release branches and just use tags on master / main but I'm just not that confident in my abilities

1

u/Foorinick 14h ago

I think the right way to act is to indeed not trust yourself and do stuff by the book, I've started doing that in my personal projects and led to me having way less bugs and concentrate better on what I'm actually supposed to be working on, along with making it easier to see why something was changed and if i should be allowed to change it again to fix something else

1

u/BoBoBearDev 15h ago edited 15h ago

I don't get it. Why you care when you only merge PRs? One PR per atomic sub-task. As long as they don't split the PR into tiny pieces like, one PR per typo correction. It is just merging PR.

You shouldn't know how anyone git. You shouldn't trust them either. Enforce fork, so they can't pollute the main repo. And squash merge the PR, so they don't sneak in some secrets in the git history. If there is a leak in the commit history of PR, you can delete the PR without fixing git history. Do not trust the PR creator to remove leaks in the git history, think it as open source project, you can't control them.

1

u/Daddy-Mihawk 14h ago

I literally thought what’s the use of rebase, used only once in last 2 years, and now still don’t remember what it does

1

u/Sentouki- 14h ago

Try: 1109 Commits 2102 Files changed 1,100,000 Lines added, 143,000 removed

1

u/Maddturtle 14h ago

I would love ai to commit for me with how often work requires me to commit

1

u/Lunchboxsushi 13h ago

This is the way

1

u/friebel 13h ago

So it's 17 branches for 17 different tickets and 17 different code reviews?

1

u/KaptainSaki 13h ago

237 commits for a simple ticket

1

u/LegendaryMauricius 13h ago

I mean 17 features for a published release makes sense. However I can imagine AI creating dozens of branches for smaller changes which become annoying to later deal with.

1

u/destroyerpants 8h ago

Stacked PRS to the rescue! 

1

u/DumbButtFace 8h ago

The marketing department started using git to deploy websites and things like that at my job. It’s complete chaos and clearly everyone is telling Claude to “just do it” over its protests

1

u/TheRapie22 2h ago

my team manages to create 17 release branches for a single release... without ai