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.
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
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.
The whole of it. The release is a single commit of a single branch (main, staging or something similar). The feature branches are those who are meant to be merged upstream, to create a new commit (by merging or rebasing). From which you can have a new release, if you wish.
The responsibility of said feature branches to find their way upstream lies always with the creator of the branch. You can't have 17 feature branches for a release. A release is not a gathering between friendly branches.
Now, if those 17 branches were created for a single feature by your coworker, though luck for him. He'll need to find a way to integrate them. The exception is when they are stacked branches but 17 is quite a big number for that.
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.
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.
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
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.
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.
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.
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.
You dont really need ai for that, or wt least not a horribly complex one, i remember vscode or github having a built in git thing that properly named stuff for you following actual standards on commit naming before ai took off
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).
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.
If you're finding that it randomly decides to do things on its own despite guardrails then I've got another level of stuff to worry about. (edit: undercaffeinated)
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.
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.
"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.
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.
Not sure how others are using it but mine generates small atomic commits which can be reviewed easily. I never have PRs with thousands of lines because I engineer the work before hand. AI is just a tool. It does allow me to move faster at the cost of not having as solid of a mental picture of everything. For work it's all AI cause that is the expectation and would be impossible to keep the pace without it. My hobby is coding by hand on side stuff.
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.
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
The code AI writes is really bad and I spend more time fixing than writing it myself. It is all imperative garbage that I have to review. It is also harder to debug and maintain if something breaks.
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
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.
Yeah but I can let it one shot my work after a bit of discussion on how it should look and I don't have to worry about any git commands. Sort of how I don't have to worry about assembly.
I can run 3 worktrees at once and focus on design / review. It's a lot faster.
Git branches are free, exactly the tool you need to safely park code before human review, can be properly documented in the PR,...
A human typing "git commit -am "qwerty" && git push --force" has no value over an AI, and you can read code in PR branch as well an in an uncommited repo
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 🤬
-1
u/Ninjaskurk Oct 15 '26
Just put commit naming restrictions and create a copilot skill for git, then you will always use copilot for this and it will always be correct.
0
u/[deleted] Oct 15 '26
[deleted] — view deleted comment