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.
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.
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???
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.
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.
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.
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.
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.
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.
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?
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.
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
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.
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.
I'm so glad we switched from gitflow to merges directly targeting main. If your code review, QA, and CI processes are mature enough, a sprint-long dev branch is just needless complexity.
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
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.
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.
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.
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.
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.
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
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
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.
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.
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.
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.
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.
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?
This is the one time I side with AI. It does a good job breaking things down into feature branches. I have coworkers that have huuuuge branch with so many changes and the merge is a nightmare
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.
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.
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.
For me, it’s the other way around: Claude gets mad at me because I’m creating branches when I’m tinkering in my own, and it gets stressed when I return and it has to figure out what shenanigans I’ve been up to
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.
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.
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.
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).
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.
I'm an apprentice in software development and today I had to spend 10 minutes to figure out where I can turn off those fuckass automated ai inline suggestions.
Honest tip if you want to survive in the industry beyond being an apprentice.... Switch those back on. Those suggestions are 99% of the time writing code waaaaaay better than what you can write
100% if you’re gonna take responsibility when it works (and the paycheck), take responsibility when it doesn’t. It’s your job to make it work, otherwise what are you being paid for
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 .
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.
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
Once you understand commits, their hashes, resets, merges, cherry picks, pushes, pulls, diffs, and branches you are pretty much there. Of course you can do so much more too.
When I was in industry, I was never a great engineer. But I spent half a day learning the internals of git and it was probably the most valuable thing I ever did for my career. It's genuinely shocking how poorly people understand it, considering how much they have to interact with it.
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.
Most commits stay in git even when you do a hard reset. I forget how to get them since I usually note the commits before a reset, but you can find them and reapply them. I think it is quite hard to lose a commit, but I'm not real sure...
True, but anything more complex than hard reset will have you searching through very unfriendly interfaces and modifying your git commands back and forth just to get the info on what happened. Even hard reset makes me check whether the selected commit is included or not every time...
Ya that's how it should be. EVERY feature gets their own branch prior to consolidating them into a feature release branch. What bugs me is not eventually archiving them into tags, I hate having a bunch of old branches.
No, you use git subtrees and then have a branch for every file edit/patch that is part of the feature so that you have multiple agents working in parallel
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
Because that's allowing it to potentially persist invalid, unsupervised changes to actual systems, and discourages you from reviewing changes properly.
I use pretooluse hook scripts to parse and block non-readonly commands for a range of important tools that have access to other systems, including git.
This is why i dont install ai cli stuff, no fucking way im letting the current state of ai control anything in my computer, and letting it directly type into my editor feels way too brainrotted, at least on a chat window i control the pace of stuff
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.
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.
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.
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
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
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.
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.
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
We have long had that many feature branches for all our releases. It's fine, as long as each one is reviewed and QAed by actual humans who know what the fuck they're looking at.
Brother, i currently have a long running branch in another teams repo, some work needs to be done before we can merge it to thier main branch. We've been rebasing it on main periodically, the branch is now 30+ commits long.
Doing that shit by hand would be nigh impossible, copilot makes it a non-issue.
1.0k
u/purpleburgundy Oct 15 '26
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.
1.1k
u/GildSkiss Oct 15 '26
As opposed to humans, who have famously never messed up git commands ever.
22
u/HallAltruistic519 Oct 15 '26
How TF is this still a problem when we have the "Squash commits and delete source branch on merge" checkbox? Are y'all restarted
32
u/50_procent Oct 15 '26
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?
4
u/SeparateAdvisor526 Oct 16 '26
This is the one time I side with AI. It does a good job breaking things down into feature branches. I have coworkers that have huuuuge branch with so many changes and the merge is a nightmare
191
u/stormdelta Oct 15 '26
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.
61
u/apt-maintenance Oct 15 '26
git push mistakes -no
4
u/WingZeroCoder Oct 15 '26
I can relate to this…
But at least now they’re finally not working directly on main? 🫠
103
u/zzulus Oct 15 '26
Hold on, people actually use Copilot?
16
u/Nixinova Oct 15 '26
Um, That's normal? You merge them using this thing called a PR...
26
u/cheezballs Oct 15 '26
Wait... What's the alternative? You guys just push all your shit directly into release?
21
u/Orio_n Oct 16 '26
Each feature gets a separate branch whats so controversial about this? Op is unemployed for sure
9
u/deadmazebot Oct 16 '26
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
25
u/Tim_TheDude Oct 15 '26
Me who uses git for years and all I do is checkout/commit/push and rarely I somehow resolve a conflict
21
u/Ok_State5255 Oct 15 '26
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 .
6
u/EricOrrDev Oct 16 '26
Ya that's how it should be. EVERY feature gets their own branch prior to consolidating them into a feature release branch. What bugs me is not eventually archiving them into tags, I hate having a bunch of old branches.
15
u/Bomaruto Oct 15 '26
Please use Claude to help you write better jokes.
33
u/WilmaTonguefit Oct 15 '26
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
5
u/akshay-nair Oct 15 '26
With commit messages like:
5
u/dallenbaldwin Oct 16 '26
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 Oct 15 '26
... 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.
2
u/AlanTheKingDrake Oct 15 '26
Only 17?
2
u/HumbersBall Oct 15 '26
I don’t get this joke
2
u/a3dprinterfan Oct 15 '26
Before GH copilot, we had 17 feature branches per release, and now we have slightly more branches... What is the joke?
2
u/dnbxna Oct 15 '26
Is it just me or do all the comments not understand the joke so therefore it's bad
2
u/MrGwinb Oct 16 '26
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 Oct 16 '26
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.
3
u/amshegarh Oct 15 '26
Copilot W? Doing things the right way?
2
u/Jastafool Oct 15 '26
ew boi, copilot?
Use chatGPT/codex, Claude, LITERALLY ANYTHING ELSE
1
u/mountaingator91 Oct 15 '26
What like that's a lot?
1
u/Guido125 Oct 15 '26
Octo merge go go!
1
u/Maasu Oct 15 '26
Yeah no agreeing with this one, agents are wizards with cli tools and a few simple guidelines.
1
u/Procrasturbating Oct 15 '26
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 Oct 15 '26
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/BoBoBearDev Oct 15 '26 edited Oct 15 '26
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 Oct 15 '26
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- Oct 15 '26
Try: 1109 Commits 2102 Files changed 1,100,000 Lines added, 143,000 removed
1
u/Maddturtle Oct 15 '26
I would love ai to commit for me with how often work requires me to commit
1
u/Lunchboxsushi Oct 15 '26
This is the way
1
u/friebel Oct 15 '26
So it's 17 branches for 17 different tickets and 17 different code reviews?
1
u/KaptainSaki Oct 15 '26
237 commits for a simple ticket
1
u/LegendaryMauricius Oct 15 '26
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 Oct 16 '26
Stacked PRS to the rescue!
1
u/DumbButtFace Oct 16 '26
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 Oct 16 '26
my team manages to create 17 release branches for a single release... without ai
1
u/ienvyi Oct 16 '26
This is a good time to remind everyone to rebase their feature branch
1
u/ModusPwnins Oct 17 '26
We have long had that many feature branches for all our releases. It's fine, as long as each one is reviewed and QAed by actual humans who know what the fuck they're looking at.
1
u/FrenchieM Oct 17 '26
What's the problem with that
1
u/iwaslovedbyme Oct 17 '26
git add . git commit -m "hello world" git push <oups> git pull git push
1
u/Fit-Cryptographer469 Oct 15 '26
Agents will merge them all right.
0
u/Moldat Oct 15 '26
Brother, i currently have a long running branch in another teams repo, some work needs to be done before we can merge it to thier main branch. We've been rebasing it on main periodically, the branch is now 30+ commits long.
Doing that shit by hand would be nigh impossible, copilot makes it a non-issue.
0
u/Zealot_TKO Oct 15 '26
Git users git mad cause AI uses git more properly than them 🤬