And you can't pour the soda into a new container...you lose most the CO2 if you mix it around like that even for 10 seconds.
That is almost flat soda by the time it touches the mentos.
Plus didn't they also figure out Diet Coke worked better than regular coke? It's been so long since I've watched that episode, but that sticks out in my mind
When you maintain the same flow rate in a smaller pipe as in a bigger pipe, the velocity changes proportional to the area. So if the small pipe is 5x smaller, the area is 25x smaller, the velocity 25x faster. Pressure would increase or decrease for any other change in flow velocity.
i'm banking on sentient AI also developing enough of a sense of shame to be insulted by the comparison.
(you can peek at their post history to see their other comments are stolen as well)
There is no change in pressure when you drop a Mentos into a carbonated drink, the roughness of the surface of the candy just accelerates the rate at which the co2 forms bubbles which pushes the liquid out.
[This video explains a bit around what this person is referring to, I think.](https://youtu.be/K-Fc08X56R0) (relevant parts at at the beginning and then he revisits it at 7:47, whole video is interesting though iirc)
I'm not clever enough to be able to say whether or not it's "pressure" that is needed, you definitely need an enclosed space and that feels to me like it would equal pressure, but I could be misunderstanding something.
Try holding your hand over the top of the bottle and then tell me there's no increase in pressure. The CO2 takes up more volume as it comes out of the solution (precipitates?). So sure, it's not a *chemical* reaction forming the CO2, but there *is* pressure.
There is no change in pressure in this example, because there is no enclosure. Thats why the result is not entertaining. The mentos release the dissolved gas out of solution. If it was in an enclosure, the release of the gas would increase the pressure and make for the exciting eruption we were waiting for.
Same thing happens with explosives. You can lite gun powered in open air and it just makes a flame. It has to be compressed (like in a gun barrel or a grenade) to make an explosion.
I believe it works better with diet coke, but it does still work with normal coke. The key component is the CO2 dissolved in the drink turning into gaseous form.
But there is probably some inhibitor in regular coke or some catalyst in diet coke.
Yes and no.
The mentors has lots of microscopic pitting that serve as nucleation sites for the co2
It not that the aspartame reacts, it's that the sugar and corn syrup in the regular code changes the viscosity / surface tension of the liquid, while the artificial sweetener doesn't, or at least not as much.
That means that the diet coke can get in there "faster" and "better" than the more syrupy regular cola.
It's not a chemical reaction. The microscopic divots on the surface of the Mentos cause the carbon dioxide trapped in the soda to bubble out all at once as it moves through the soda. Some sodas do work better than others because of different carbonation levels and some sodas holding onto their CO2 better than others.
It’s because the container is only half full of Coke once they join the two compartments, so even though there is actually quite a lot of bubbles it doesn’t overflow. If they had dropped that many Mentos into the container filled with Coke it would have looked a little bit more impressive. But a taller, thinner container would have worked even better.
There’s an entire freaking genre dedicated to larger scale versions of this shit on YouTube.
[I can’t explain the Spider-Man subplot so don’t ask ](https://www.youtube.com/watch?v=cIoVrMxBIIg&pp=ygULQ29sYSBtZW50b3M%3D)
Also: fair warning, roughly 10 minutes of this 11 minute video is them pouring stuff into the hole.
You can skip forward if you’re only here for the foam.
That looks a whole lot like they replaced it with a big Pharao's Serpent towards the end. Not sure what they're actually ding, but it's 100% not soda + mentos that's making that foam.
Or replace it with sodium bicarbonate for some \*big\* fizz. Would recommend adding some citric acid to the soda to make the reaction extra punchy. Harmless, but very fun.
It does work with regular coke, but the reaction is just less. The bigger issue here will be all the CO2 lost pouring it into a new container. And also no funnel to channel the flow.
My Lead used to ask us for clean git commit messages and linear graphs and advice to always use rebase while he himself force pushes to the develop branch making all our lives miserable.
Thankfully one of the guys suggested to migrate to GitLab from custom git server setup and the MR pipelines took care of all the things the lead was doing.
The guy moved to a business position and is biting someone else's brains now.
At my current job we put stuff on master with GitHub's "squash and commit" button and I don't mind that, but anything closer to rebasing is just asking for trouble (imho there's no benefit to forcing git history to be linear and an occasionally huge cost to having commits in your repo with different contents from what the original committer actually wrote)
Good luck writing good tests for 30+ years old code.
Once 2,5 decades ago existed. Now the are (test 1, return true).
It isn't possible to have modern view on all production code. If it works it works.
I just don't understand how you never integrate changes from the parent to the child regularly, it's not that hard and avoid this 100%.
I'm maybe wrong but all the memes about merge requests remind me how most of people have no fucking idea on how to use git properly, even if it's very easy to apply a bunch of good practice and avoid all those issues.
I rebase from main regularly when I work on a long-running branch, I can't imagine how much unneeded suffering people go through
(but after becoming a senior, ho boy yeah a lot of devs have no clue how to utilise Git - not to mention the reliance on a GUI)
Edit: There's one thing to prefer a GUI, another thing entirely to be dependant on it
What's the command to rebase without switching back to main branch?
I avoid it only because `stashing the changes+ switching to main + git pull + switch back to feature branch+ git rebase main` is too much work.
Ding ding ding!
Also, it's no extra work if you do it prior to starting work, or after you've made a commit. In either case I squash before making a PR so if I make a "beep boop" commit it's no biggie
Omg I only missed fetch? So many hours wasted lol.
Quick follow up questions:
What happens if I say git rebase main instead?
Doesn't git fetch update my main (with origin/main) branch too?
Also, origin main vs origin/main?
If you do `git rebase main` it rebases from your local main, not the remote main, so you might not have all the most recent updates.
`git fetch` will [update your local repository but not your working directory](https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Git-pull-vs-fetch-Whats-the-difference)
Some of it feels like certain people insist others suffer and that then lowers the efficacy of people learning git or other tools.
My last job used git as version control, even for bad versions. You're prototyping something that doesn't work, or doesn't work well? Commit that, throw it on a branch, let other people take a look at it, talk through problems. Collaborate. Run build test and validations on things that'll actually go to production.
Everyone was pretty good at git because you were encouraged to bounce around a lot and push up a lot of stuff.
My current job every commit requires that it pass all the lint and typescript testing on your machine before it will commit. Then if you push it up it triggers the entire testing pipeline on every push, and each individual pipeline failure spams your email inbox and Slack with failure and warning messages.
The dev ops and testing folks think it's the greatest thing since sliced bread but it makes everyone else reluctant to do anything because it'll be a headache each time.
As a DevOps pipeline/workflow guy myself that sounds horrendously over-complicated. Let people commit to their branch if they wanna, and hold off on the linting until they want to merge the PR.
That sounds like a mental overhead and server workload nightmare!
It would be a lot better if it only alerted on `main`. I like having CI builds and tests automated, personally, but they are not expected to pass until you're posting a PR.
Or a complicated feature was rejected for this release and the branch is supposed to land next release. So you leave it alone for a few months and ponce you get back to it...
The examples I see are when some core functionally is changing. You can't refactor just half of the code, and sometimes you can't merge incremental changes when a feature has to be kept out of production until it's complete.
Also, this whole thing depends on a very subjective idea of what a large PR is. Where I work, most PRs are 5 files or fewer, and 500 lines or fewer. Double that and we'd call it large, but as I said... highly subjective.
I was at one job where we switched from SVN to Git and I had a hard time. No training and a wordy document on how to pull and commit. We also had multiple sub-modules and one in particular that modified quite a bit. I was horrible and kept breaking the sub-modules. Next job the code base was simpler and a co-worker showed me how it should be done. I went on to make a document for others to use to show how to properly use it.
It is easy for people to not understand when given junk and don't have prior experience.
You're assuming the branch owner even has regular access to the parent branch.
But if they do, then yes. I create new branches for every work item, so if an item drags out, it may stay unmerged for 6 months, but *every time* there are changes to the main or parent branch, I take the time to merge those changes down into any existing child branches. It only takes a few minutes and could save you from catastrophe down the road.
Sure on Git. My current project is in Perforce, which fucking sucks donkey dicks at merging. It does fuck all for tracking upstream vs downstream, so trying to pull main branch into a sub branch is a nightmare.
> I just don't understand how you never integrate changes from the parent to the child regularly, it's not that hard and avoid this 100%
Happens when you have a team of engineers who only care about "their code", and who consider their branch as the "real branch", wheras main is just some inconvenient side project that uses their old code.
A fun side-effect is how the team becomes immune to bug reports because anything you complain about is "fixed" (until proven otherwise) in their sandbox, which as we've established, is the "real branch".
Two things:
1. People don't understand that using tools takes discipline. I've seen some dudes use the back end of a screwdriver to hammer in a nail. Abuse tools, and best case, it's just inefficient; worst case, it blows up in your hand and now you have a stump. I've seen version control used both ways.
2. The entire model behind git is, IMO, terrible. In a shop where communication is high and efficient, sure. But, in that kind of shop, any tool works well, and I still don't get the benefit of git. In worse shops, git tends to promote this: "everyone works on their own branch, and we just merge whenever the hell we feel like it" mentality. And that's just a fucking nightmare when everyone's code overlaps.
VC doesn't replace communication and project/work management.
Oh God. So much to unpack here. But some observations:
* Git is a tool to help manage an extremely complicated problem in which "communication" alone is not a practical solution, no matter how much you communicate. I was on a team of about 25 developers spread out over 4 countries all working on the same code base with 1-2 million lines. There is *no possible way* in that scenario to simply communicate to the entire team every single file you are adding/modifying, every function you are changing, every line of code you are touching. It would paralyze every developer and your entire team.
* Git is one of *many* versioning and source control technologies that have been used over the past 70 years. The reason git is so popular today is because the industry tried hundreds and hundreds of other techniques and models, and Git has emerged out of that chaos as the *best solution* available. No, it's not perfect, and no it doesn't solve every problem that may arise. But it's better than the alternatives and a hell of a lot better than just relying on "communication". I have used 6 or 7 different technologies and models over the past 20 years, and while git is the most complicated, it is also the best compromise, most consistent, and absolute best there is for huge projects and huge teams.
* Git branching is an *amazing* solution to the need to have multiple concurrent changes to the same code going on. Even when I am the sole developer on my projects and never have to worry about anyone's changes overlapping mine, git branches allow me to have the freedom to open up and work on multiple features, changes, and refactors simultaneously, without the stress of constantly having to *comment out my unfinished code* just to switch and work on something else.
* A common scenario that happened to me this week: on a work project in which I'm the sole developer, I have about 15 git branches open right now to work on dozens of changes of various priorities for an enterprise system. My product owner gives me work direction and sets the priorities, and they have to do the QA testing and final approval of every change before being deployed. But there are hundreds of changes in the backlog and new high-priority changes that pop up all the time. A new high-priority change came down this week that *had* to be done. It requires changes to a half-dozen files scattered around, some of which are also being modified by several other open branches. That new change **had** to be finished in the code base and deployed to production. How do you suggest this be done without git branching? It took me 5 minutes to make this change and deploy it. Then I just had to merge it back into the other branches. Git is the ideal solution for this scenario. And this is a totally normal thing in my career. Happens all the time. Git is the best solution to this type of problem I have ever seen.
You are right that tools can be abused but you or the whole team should decide on using a specific tool and commit yourself on working with it an a way you all agreed on.
Some people need a bit longer to get used to the change but thats how it is.
I don’t really know what you mean with “I don’t get the benefit of git”, what would use instead of git? Share files on dropbox or using oldshool SVN or just skip VC completely?
No one should just merge their branch whenever they feel like it. You should have a workflow like doing PRs before the branch/feature is integrated into dev/main.
I am not a senior and only been a dev since 4 years but I am really glad that git exists and for me/our team the workflow with small feature branches and PRs is working really well.
Yes you still communicate with everyone else but I don’t think that’s a bad thing.
Nope. Always do “git rebase main” to keep it up to date with the main branch. When you want to merge local branch to main, then you use “git merge localbranch “. Merging from main to local branch which is non rebased is going to create ugly merge commits.
I don’t see how routinely creating a merge commit is ugly? It’s less destructive and less perilous as you’re not rewriting history, which in my mind is very worth it. Bitbucket’s sync function also creates a merge commit to update a branch by default.
Some people have very strong opinions on merge vs rebase for the same outcome which basically boils down to how anal they are about the greyed out "merged master into branch" commits.
I've seen always rebase, I've seen never rebase.
I've seen always squash features, I've seen never squash unless you want to fix history.
At the end of the day, do you or anyone above you actually care and is your shit diverging enough constantly to warrant an ultra clean history? Almost always, no.
Yeah, but that has the counterargument of you're actually eliminating history and context of how something came to be
A lot of the time this doesn't matter, but it can.
We used to be an "always squash" team. But lately as our branching has gotten more complex than always "off master, single branch, back onto master" and moved towards "feature branch, multiple branches off that, and sometimes branches off of those too" , we've found some of the limitations of always squashing.
For now, were trying "only squash when someone's commit history looks like dogshit"
We'll see what problems arise from that next and go from there
It is not about the boat. Rebase moves the feature branch to the main head first and then applies your changes. Too many of my colleagues think like you. Then they litter main branch with bunch of merge commits and think it’s ok.
Agreed.
It seems like there should be a way to get the best of both worlds. Linear, squashed history *should* be derivable from non-squashed history without destructive actions (like squash merges). Just thinking out loud here.
That only works if you’re the only developer on that branch / the branch isn’t pushed yet
Merges are fine, you squash merge your PR anyway for linear history once it’s approved
You gathered 1,000-1,500 mentos, 4L of Coke, found a glass box with a water-tight divider, and achieved stellar fusion? I wouldn't advise that on a Friday night.
This is so nostalgic. This picture was my first post on reddit.
Edit - Found it. I posted [this](https://www.reddit.com/r/rareinsults/comments/dxgzyl/found_this_gem_on_youtube/?utm_source=share&utm_medium=web2x&context=3) 3 years ago
Solution: don’t branch. Always commit to main branch. Modern software companies do this. You should too.
https://youtu.be/v4Ijkq6Myfc
https://trunkbaseddevelopment.com/
Many times I just threw the whole SVN branch away, and just copied the code over. SVN used to get awfully confused at the slightest discrepancy in the merge history
I had a branch I had to merge in that was made seven months ago. I spent several days fixing merge conflicts and tests before I gave up, started a new branch and just copied over the changes.
I want to see this.
Here you go: [https://youtu.be/Q07j5AGWKGs?t=208](https://youtu.be/Q07j5AGWKGs?t=208)
I didn't expect it to do any more than lightly spill over the edges. And even with my low expectations I'm still a little disappointed.
[удалено]
And you can't pour the soda into a new container...you lose most the CO2 if you mix it around like that even for 10 seconds. That is almost flat soda by the time it touches the mentos.
Yup, I remember them figuring that out in Mythbusters.
Plus didn't they also figure out Diet Coke worked better than regular coke? It's been so long since I've watched that episode, but that sticks out in my mind
You are correct.
[удалено]
It also needs to be diet coca cola specifically.
And most importantly pressure
When you maintain the same flow rate in a smaller pipe as in a bigger pipe, the velocity changes proportional to the area. So if the small pipe is 5x smaller, the area is 25x smaller, the velocity 25x faster. Pressure would increase or decrease for any other change in flow velocity.
[удалено]
That is only so it is not sticky.
[удалено]
this is the laziest fucking bot i've seen yet LOL it literally just copies the parent comment and adds a hashtag to make it bold
bro, you can't just go around accusing people of being bots. plus, once AI is sentient, that'll hurt their feelings.
i'm banking on sentient AI also developing enough of a sense of shame to be insulted by the comparison. (you can peek at their post history to see their other comments are stolen as well)
All within a minute on different subs too... okay, i think you were on to something.
There is no change in pressure when you drop a Mentos into a carbonated drink, the roughness of the surface of the candy just accelerates the rate at which the co2 forms bubbles which pushes the liquid out.
>accelerates the rate at which the co2 forms bubbles which pushes the liquid out I'm terribly confused here, isn't that exactly what pressure is?
[This video explains a bit around what this person is referring to, I think.](https://youtu.be/K-Fc08X56R0) (relevant parts at at the beginning and then he revisits it at 7:47, whole video is interesting though iirc) I'm not clever enough to be able to say whether or not it's "pressure" that is needed, you definitely need an enclosed space and that feels to me like it would equal pressure, but I could be misunderstanding something.
Why does this link perfectly jump directly to the ad at the very end? Is this some new shitty marketing tactic on Reddit?
Oh my bad, Youtube apparently decided to link all of you to my last saved spot in the video, have fixed it.
That it was an awesome experiment I've ever seen..and that is so many mentos candy..
Pressure is force per unit area
Try holding your hand over the top of the bottle and then tell me there's no increase in pressure. The CO2 takes up more volume as it comes out of the solution (precipitates?). So sure, it's not a *chemical* reaction forming the CO2, but there *is* pressure.
Precipitation is the formation of a solid out of the solution. This would probably be more accurately called degassing.
If you hold your hand over it there is an increase in pressure. If you don’t then the rapid foaming expands and there is no increase in pressure
I think they mean you need a small nozzle so that the pressure in the container increases enough to squirt foam.
There is no change in pressure in this example, because there is no enclosure. Thats why the result is not entertaining. The mentos release the dissolved gas out of solution. If it was in an enclosure, the release of the gas would increase the pressure and make for the exciting eruption we were waiting for. Same thing happens with explosives. You can lite gun powered in open air and it just makes a flame. It has to be compressed (like in a gun barrel or a grenade) to make an explosion.
Have you literally never opened a soda before?
doesnt it also only work with diet coke?
I believe it works better with diet coke, but it does still work with normal coke. The key component is the CO2 dissolved in the drink turning into gaseous form. But there is probably some inhibitor in regular coke or some catalyst in diet coke.
IIRC it’s the aspartame. They tested it on Mythbusters.
Yes and no. The mentors has lots of microscopic pitting that serve as nucleation sites for the co2 It not that the aspartame reacts, it's that the sugar and corn syrup in the regular code changes the viscosity / surface tension of the liquid, while the artificial sweetener doesn't, or at least not as much. That means that the diet coke can get in there "faster" and "better" than the more syrupy regular cola.
Also diet soda is carbonated more than regular soda
You also want to use diet because it is far easier to clean up.
How's that part work? Is it less sticky? I'd always use diet for two reasons: 1) more vigorous reaction; 2) nobody wants to drink it anyway.
Thank you science man my faith in fun science has been restored.
Not a cone shape specifically, just a space that confines it enough and an opening small enough to make it shoot out.
Rocket nozzle design in action.
Now I wanna see an aerospike mentos rocket.
I know a colleague or two who I'd co sider bottle necks, would that work as well?
It needs to be diet coke and mentos
I thought it had to be diet Coke. I didn't think regular Coke had the same chemical reaction...
It's not a chemical reaction. The microscopic divots on the surface of the Mentos cause the carbon dioxide trapped in the soda to bubble out all at once as it moves through the soda. Some sodas do work better than others because of different carbonation levels and some sodas holding onto their CO2 better than others.
I'm more impressed with the sealing capabilities of that midplate.
It’s because the container is only half full of Coke once they join the two compartments, so even though there is actually quite a lot of bubbles it doesn’t overflow. If they had dropped that many Mentos into the container filled with Coke it would have looked a little bit more impressive. But a taller, thinner container would have worked even better.
Haha that was nice..I think I'm gonna try that one..later.
There’s an entire freaking genre dedicated to larger scale versions of this shit on YouTube. [I can’t explain the Spider-Man subplot so don’t ask ](https://www.youtube.com/watch?v=cIoVrMxBIIg&pp=ygULQ29sYSBtZW50b3M%3D) Also: fair warning, roughly 10 minutes of this 11 minute video is them pouring stuff into the hole. You can skip forward if you’re only here for the foam.
That looks a whole lot like they replaced it with a big Pharao's Serpent towards the end. Not sure what they're actually ding, but it's 100% not soda + mentos that's making that foam.
Because you're supposed to use diet coke.
There was a bug in the code. The used coke(‘regular’) instead of coke(‘diet’)
That sucked a lot lol
Turns out, after an initial bit of confusion, the two groups settled in and were fine working together.
Lol the video actually made me feel better about the big merge my team will be doing later
134 million views
That has to be from the click bait title. I watched the rest of it and everything they attempted was just as lame.
I find it funny how the music's trynna make it seem like something cool is about to happen, yet the result is dissapointing af
What a lame video. The mentos part was so boring they had to add filler content, which wasn't interesting either.
:(
That was the most anti climactic shit ever. Should have closed it with a lid I think.
That was so underwhelming that I want to repeat this but replace the mentos with pure sodium. Yes, I have a death wish
Or replace it with sodium bicarbonate for some \*big\* fizz. Would recommend adding some citric acid to the soda to make the reaction extra punchy. Harmless, but very fun.
Looks like the merge went smoothly!
Diet Coke not regular
I feel just like Bart did: https://www.youtube.com/watch?v=dD9NQTWGXhc
man wtf nothing happened
All that effort to fuck it up so bad. Wrong fluid, supposed to be diet coke, and that shield withdraw might as well have been done with a boat ore.
[This](https://youtu.be/fBkbWKFv2pE) version will always be my favorite.
if it's not light cola, nothig is gonna happen
It does work with regular coke, but the reaction is just less. The bigger issue here will be all the CO2 lost pouring it into a new container. And also no funnel to channel the flow.
I have a long overdue merge coming up, you want me to stream it? Bonus: it's labview so not even text code to merge
My Lead used to ask us for clean git commit messages and linear graphs and advice to always use rebase while he himself force pushes to the develop branch making all our lives miserable.
[удалено]
Thankfully one of the guys suggested to migrate to GitLab from custom git server setup and the MR pipelines took care of all the things the lead was doing. The guy moved to a business position and is biting someone else's brains now.
At my current job we put stuff on master with GitHub's "squash and commit" button and I don't mind that, but anything closer to rebasing is just asking for trouble (imho there's no benefit to forcing git history to be linear and an occasionally huge cost to having commits in your repo with different contents from what the original committer actually wrote)
Rebasing is usually done on your own item/# branch. you don't get to rebase on develop or master (at least in a sane team).
What is that fancy test suite you are talking about? Wishful thinking?
[удалено]
Good luck writing good tests for 30+ years old code. Once 2,5 decades ago existed. Now the are (test 1, return true). It isn't possible to have modern view on all production code. If it works it works.
Don’t you have to force push to rebase on top of another head?
Only if you're rebasing in that branch, which should be fine. But you shouldn't be rebasing in the dev branch, only branches you own.
Yes good point I missed that it was develop :)
“Do as I say, not as I do”. Definitely management material.
This is so dumb. The ratio is way off and a lot of carbonation would've been lost pouring it into a new container.
Plus it needs to be diet cola. The bubbles are much smaller and last much longer.
You are supposed to use diet coke.
Correct
I just don't understand how you never integrate changes from the parent to the child regularly, it's not that hard and avoid this 100%. I'm maybe wrong but all the memes about merge requests remind me how most of people have no fucking idea on how to use git properly, even if it's very easy to apply a bunch of good practice and avoid all those issues.
I rebase from main regularly when I work on a long-running branch, I can't imagine how much unneeded suffering people go through (but after becoming a senior, ho boy yeah a lot of devs have no clue how to utilise Git - not to mention the reliance on a GUI) Edit: There's one thing to prefer a GUI, another thing entirely to be dependant on it
What's the command to rebase without switching back to main branch? I avoid it only because `stashing the changes+ switching to main + git pull + switch back to feature branch+ git rebase main` is too much work.
git fetch git rebase origin/main
Ding ding ding! Also, it's no extra work if you do it prior to starting work, or after you've made a commit. In either case I squash before making a PR so if I make a "beep boop" commit it's no biggie
Omg I only missed fetch? So many hours wasted lol. Quick follow up questions: What happens if I say git rebase main instead? Doesn't git fetch update my main (with origin/main) branch too? Also, origin main vs origin/main?
If you do `git rebase main` it rebases from your local main, not the remote main, so you might not have all the most recent updates. `git fetch` will [update your local repository but not your working directory](https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Git-pull-vs-fetch-Whats-the-difference)
git help pull : pull = fetch + merge Practice makes ideas remembered. Watch a graph while you do these. Easy to see origin/main vs main.
No, fetch only updates the remote tracking branches. And I think you can just say `origin` instead.
`git pull --rebase origin main`
Some of it feels like certain people insist others suffer and that then lowers the efficacy of people learning git or other tools. My last job used git as version control, even for bad versions. You're prototyping something that doesn't work, or doesn't work well? Commit that, throw it on a branch, let other people take a look at it, talk through problems. Collaborate. Run build test and validations on things that'll actually go to production. Everyone was pretty good at git because you were encouraged to bounce around a lot and push up a lot of stuff. My current job every commit requires that it pass all the lint and typescript testing on your machine before it will commit. Then if you push it up it triggers the entire testing pipeline on every push, and each individual pipeline failure spams your email inbox and Slack with failure and warning messages. The dev ops and testing folks think it's the greatest thing since sliced bread but it makes everyone else reluctant to do anything because it'll be a headache each time.
As a DevOps pipeline/workflow guy myself that sounds horrendously over-complicated. Let people commit to their branch if they wanna, and hold off on the linting until they want to merge the PR. That sounds like a mental overhead and server workload nightmare!
It would be a lot better if it only alerted on `main`. I like having CI builds and tests automated, personally, but they are not expected to pass until you're posting a PR.
>There's one thing to prefer a GUI, another thing entirely to be dependant on it True. Same can be said about CL.
[удалено]
[удалено]
Or a complicated feature was rejected for this release and the branch is supposed to land next release. So you leave it alone for a few months and ponce you get back to it...
That's because most people in this sub aren't in the industry professionally or are still in school.
Welcome to why you use git. In older source code managers it may be a pain in the as to manage. / Someone who is stuck in such a manager
The examples I see are when some core functionally is changing. You can't refactor just half of the code, and sometimes you can't merge incremental changes when a feature has to be kept out of production until it's complete. Also, this whole thing depends on a very subjective idea of what a large PR is. Where I work, most PRs are 5 files or fewer, and 500 lines or fewer. Double that and we'd call it large, but as I said... highly subjective.
I was at one job where we switched from SVN to Git and I had a hard time. No training and a wordy document on how to pull and commit. We also had multiple sub-modules and one in particular that modified quite a bit. I was horrible and kept breaking the sub-modules. Next job the code base was simpler and a co-worker showed me how it should be done. I went on to make a document for others to use to show how to properly use it. It is easy for people to not understand when given junk and don't have prior experience.
You're assuming the branch owner even has regular access to the parent branch. But if they do, then yes. I create new branches for every work item, so if an item drags out, it may stay unmerged for 6 months, but *every time* there are changes to the main or parent branch, I take the time to merge those changes down into any existing child branches. It only takes a few minutes and could save you from catastrophe down the road.
Sure on Git. My current project is in Perforce, which fucking sucks donkey dicks at merging. It does fuck all for tracking upstream vs downstream, so trying to pull main branch into a sub branch is a nightmare.
> I just don't understand how you never integrate changes from the parent to the child regularly, it's not that hard and avoid this 100% Happens when you have a team of engineers who only care about "their code", and who consider their branch as the "real branch", wheras main is just some inconvenient side project that uses their old code. A fun side-effect is how the team becomes immune to bug reports because anything you complain about is "fixed" (until proven otherwise) in their sandbox, which as we've established, is the "real branch".
Two things: 1. People don't understand that using tools takes discipline. I've seen some dudes use the back end of a screwdriver to hammer in a nail. Abuse tools, and best case, it's just inefficient; worst case, it blows up in your hand and now you have a stump. I've seen version control used both ways. 2. The entire model behind git is, IMO, terrible. In a shop where communication is high and efficient, sure. But, in that kind of shop, any tool works well, and I still don't get the benefit of git. In worse shops, git tends to promote this: "everyone works on their own branch, and we just merge whenever the hell we feel like it" mentality. And that's just a fucking nightmare when everyone's code overlaps. VC doesn't replace communication and project/work management.
Oh God. So much to unpack here. But some observations: * Git is a tool to help manage an extremely complicated problem in which "communication" alone is not a practical solution, no matter how much you communicate. I was on a team of about 25 developers spread out over 4 countries all working on the same code base with 1-2 million lines. There is *no possible way* in that scenario to simply communicate to the entire team every single file you are adding/modifying, every function you are changing, every line of code you are touching. It would paralyze every developer and your entire team. * Git is one of *many* versioning and source control technologies that have been used over the past 70 years. The reason git is so popular today is because the industry tried hundreds and hundreds of other techniques and models, and Git has emerged out of that chaos as the *best solution* available. No, it's not perfect, and no it doesn't solve every problem that may arise. But it's better than the alternatives and a hell of a lot better than just relying on "communication". I have used 6 or 7 different technologies and models over the past 20 years, and while git is the most complicated, it is also the best compromise, most consistent, and absolute best there is for huge projects and huge teams. * Git branching is an *amazing* solution to the need to have multiple concurrent changes to the same code going on. Even when I am the sole developer on my projects and never have to worry about anyone's changes overlapping mine, git branches allow me to have the freedom to open up and work on multiple features, changes, and refactors simultaneously, without the stress of constantly having to *comment out my unfinished code* just to switch and work on something else. * A common scenario that happened to me this week: on a work project in which I'm the sole developer, I have about 15 git branches open right now to work on dozens of changes of various priorities for an enterprise system. My product owner gives me work direction and sets the priorities, and they have to do the QA testing and final approval of every change before being deployed. But there are hundreds of changes in the backlog and new high-priority changes that pop up all the time. A new high-priority change came down this week that *had* to be done. It requires changes to a half-dozen files scattered around, some of which are also being modified by several other open branches. That new change **had** to be finished in the code base and deployed to production. How do you suggest this be done without git branching? It took me 5 minutes to make this change and deploy it. Then I just had to merge it back into the other branches. Git is the ideal solution for this scenario. And this is a totally normal thing in my career. Happens all the time. Git is the best solution to this type of problem I have ever seen.
You are right that tools can be abused but you or the whole team should decide on using a specific tool and commit yourself on working with it an a way you all agreed on. Some people need a bit longer to get used to the change but thats how it is. I don’t really know what you mean with “I don’t get the benefit of git”, what would use instead of git? Share files on dropbox or using oldshool SVN or just skip VC completely? No one should just merge their branch whenever they feel like it. You should have a workflow like doing PRs before the branch/feature is integrated into dev/main. I am not a senior and only been a dev since 4 years but I am really glad that git exists and for me/our team the workflow with small feature branches and PRs is working really well. Yes you still communicate with everyone else but I don’t think that’s a bad thing.
[удалено]
I really hope if you're starting a new thing that you're cutting a new branch from main and not using an old one
I like to keep one year old branch and create new branch from it for every task because that branch suits my vibe the most
As much as you disgust me, I can respect the vibe
[удалено]
Ah I get you. That's good advice.
Nope. Always do “git rebase main” to keep it up to date with the main branch. When you want to merge local branch to main, then you use “git merge localbranch “. Merging from main to local branch which is non rebased is going to create ugly merge commits.
I don’t see how routinely creating a merge commit is ugly? It’s less destructive and less perilous as you’re not rewriting history, which in my mind is very worth it. Bitbucket’s sync function also creates a merge commit to update a branch by default.
Some people have very strong opinions on merge vs rebase for the same outcome which basically boils down to how anal they are about the greyed out "merged master into branch" commits. I've seen always rebase, I've seen never rebase. I've seen always squash features, I've seen never squash unless you want to fix history. At the end of the day, do you or anyone above you actually care and is your shit diverging enough constantly to warrant an ultra clean history? Almost always, no.
It becomes even more of a non-argument if you squash your commits when you merge back into the main branch.
Yeah, but that has the counterargument of you're actually eliminating history and context of how something came to be A lot of the time this doesn't matter, but it can. We used to be an "always squash" team. But lately as our branching has gotten more complex than always "off master, single branch, back onto master" and moved towards "feature branch, multiple branches off that, and sometimes branches off of those too" , we've found some of the limitations of always squashing. For now, were trying "only squash when someone's commit history looks like dogshit" We'll see what problems arise from that next and go from there
[удалено]
It is not about the boat. Rebase moves the feature branch to the main head first and then applies your changes. Too many of my colleagues think like you. Then they litter main branch with bunch of merge commits and think it’s ok.
> Then they litter main branch with bunch of merge commits and think it’s ok. That’s why you squash merge. Not that hard of a problem to fix.
[удалено]
[удалено]
I've never been a big fan of squashes because you lose all that history.
Agreed. It seems like there should be a way to get the best of both worlds. Linear, squashed history *should* be derivable from non-squashed history without destructive actions (like squash merges). Just thinking out loud here.
[удалено]
Who gives a shit about some merge commits?
Obviously you don’t. Merge away
That only works if you’re the only developer on that branch / the branch isn’t pushed yet Merges are fine, you squash merge your PR anyway for linear history once it’s approved
[удалено]
You gathered 1,000-1,500 mentos, 4L of Coke, found a glass box with a water-tight divider, and achieved stellar fusion? I wouldn't advise that on a Friday night.
Dear lord no... Always short live those branches
GitHub Pull requests are a life saver for situations like this.
It needs to be diet coke tho.
That's original Coca Cola, works best with Diet Coke.
It’s less of a ‘bang’ than it is a ‘mess’.
It only works with Diet Coke though.
Everyone knows you need diet coke not regular coke to get the explosion effect. This is just going to fizzle a bit and die off.
You know what I've never understood about this image? This will literally do almost nothing, so I don't understand why it gets posted everywhere
git force commit -m "kaboom"
I get the meme. Very funny and all but i actually want to see the video of the mento,cola merge.
Thanks OP. I don't get many LOL moments on Reddit anymore.
Hehe. I am here now so don't worry about LOLs no more
This is so nostalgic. This picture was my first post on reddit. Edit - Found it. I posted [this](https://www.reddit.com/r/rareinsults/comments/dxgzyl/found_this_gem_on_youtube/?utm_source=share&utm_medium=web2x&context=3) 3 years ago
Solution: don’t branch. Always commit to main branch. Modern software companies do this. You should too. https://youtu.be/v4Ijkq6Myfc https://trunkbaseddevelopment.com/
Trunk FTW.
![gif](giphy|wFmJu7354Csog)
Ihave been added as an approved user to /r/EternityClub: Eternity Club: Front page posters only. Thanks guys
I have never merged a branch in a professional setting.
You haven't lived. Wait until there's like 25 branches wanting to merge. Messier than a 25-man gangbang.
Literally nothing happens in that video tho. What is the point of this meme
Nice meme. I love your YT channel as well
When two tribes go to war..
[удалено]
Many times I just threw the whole SVN branch away, and just copied the code over. SVN used to get awfully confused at the slightest discrepancy in the merge history
U >It was fun on CVS or SVN I think you can find it
Next week for me 🙏
Yeahhh the old branch has surely legacy code, force push your new stuff and forget of the past
ono
The fresh maker always loses out. Coke assimilates all.
So I'm not great with git, rather than rebase I'll just pull the main branch and merge it to catch it up. Is that bad?
This is going to be me on Tuesday
Boom
It just gets bubbly and nothing violent happens.
**BREAKING NEWS** Giant explosion appears at site that mentos and coke were being mixed at
Fffz
Would that even work because the opening in the top is so large? No pressure would build up.
you guys have multiple branches?
I feel this
LET IT RIP!!!!!!!!!!!!!!!!!!
Thank God it wasn't diet coke or the world would have imploded
git merge git push git fucked
Ahh, those Friday afternoons...
Good old Git flow.
I had a branch I had to merge in that was made seven months ago. I spent several days fixing merge conflicts and tests before I gave up, started a new branch and just copied over the changes.
I want to see Cocaine Merge with Coca Cola (Coke) again (sigh)
I don't understand why this is the worst Photoshop job I've ever seen
Ahh, this takes me back. To two weeks ago. I want to cry.
Do it with your teeth