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
5
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
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
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
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
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
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
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
6
19
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?
→ More replies (1)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.
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 respectfor 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).
→ More replies (4)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.
15
5
2
→ More replies (1)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.
11
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?
→ More replies (6)3
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
→ More replies (23)1
u/Messy-Recipe 3h ago
git push& all similar/wildcarded things went on my blacklist immediately when we got claude code licensesthat 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
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.
1
14
5
u/akshay-nair 15h ago
With commit messages like:
Adds whatever feature
...10 lines describing what the 5 lines of diff do.
1
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
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.
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
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
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.
→ More replies (4)1
4
u/WingZeroCoder 17h ago
I can relate to this…
But at least now they’re finally not working directly on main? 🫠
2
2
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/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
2
u/Jastafool 19h ago
ew boi, copilot?
Use chatGPT/codex, Claude, LITERALLY ANYTHING ELSE
1
u/Worldly-Stranger7814 16h ago
Grok?
1
1
1
1
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/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
1
1
1
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
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
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.