DEV Community

Cover image for How to ruin your life trying to do gitflow
🍉 Esteban Vargas
🍉 Esteban Vargas

Posted on • Originally published at watermelontools.com

How to ruin your life trying to do gitflow

Gitflow is the best way to develop

Let’s be honest, gitflow is the best way to develop. You have the most recent accepted version and create a workspace where nobody will bother you and then expose it and (hopefully) get it accepted. Beautiful.

But it has a dark side.

When the gitflow bus leaves you behind, e.g. someone merges before you, your branch is behind. If those changes touch the same files you’ll find a distressing message in your terminal or the GitHub UI.

Now, your changes and the most current version are in a fight and it’s your responsibility to make both get along. That is gitflow.

You will take your git pull --force command and start fixing merge conflicts. If you pull with git pull --rebase you will see every piece of code clash against you and will have to pick which pieces to keep for every conflicting commit, which honestly is good because you get a sense of what changed. Ah, beautiful conflict read and awesome HEAD text. Use an IDE or GUI for this, that’s a thing not mentioned in gitflow. Save some hair, avoid the command line.

This traumatic experience can range from a couple minutes to a few hours as you toil all the files and contextualize yourself with how other people solve problems. The stakes are high as the other developer already was accepted. Hell, maybe you went “LGTM! 👍” on their PR. Their gitflow was pure and beautiful.

When you are done with this patience testing, you continue your task, hoping that no one else will get across the finish line before you do.

As you code, your “feature/amazing-new-thing” branch becomes crowded and full of commits. You know what’s in there, in the end you wrote it, but no one else does. It is a silo.

And then, you’re done.

Now it’s time to push and write to the Pull Request template your team decided on. Type, checkbox, add image and now you’re awaiting scrutiny, your part of gitflow is done. In an organized team, the time to be reviewed should be short. People should start their workday by checking their repos, especially if you have CODEOWNERS in them. If not, we recommend you add the GitHub Bot on Slack to save some time being pushy. Let’s agree to call it “Slack pushed gitflow”

Eventually, you’ll get comments or stamps (remember “LGTM! 👍”?) and will have to respond to them. If the administrator did their job right, you will be required to resolve conversations before merging. Your tests will have passed. The deploy system will have run and approved your build, automatic gitflow beats using people. Everything seems to be going great.

And disaster strikes.

Gitflow's dark side

You hear that beautiful sound of an incoming call from the Team Lead. Something has gone awry. You panic a bit, run to get a decent sweater, shuffle for your headphones and pick up.

“Hey! Saw your PR”, she starts. It’s on you now, don’t panic, you did a good job.
Without stuttering you make small talk and ask what’s up.
“Oh, a small thing, we are now using [insert thing] now, it got posted to Slack and I changed the ticket in Linear”. Right, you missed that one. Merging “feature/amazing-new-thing” to “main” was the only thing in your mind, gitflow style. You were wrong to allow yourself into the flow zone by turning off all notifications.

Well, now you gotta change that part before clicking the satisfactory green “MERGE” button, but there should be another way. It’s been about a day fighting this while you should be tanning while hiking or grabbing hot pot with the squad.

And there is!

A solution to gitflow's flaw

We built Watermelon to tackle these issues. We know that gitflow is great but sometimes gets in the way. You want to deploy PRs with business value. Your manager wants every developer with the best velocity they can give. You got the huge screen, clicky split keyboard, sound blocking headphones and expensive laptop but the software you use is not enough. While juggling Ticketing Systems, Internal Messaging, Git Platforms and Documentation you are left out of your IDE, whether it be VSCode or the IntelliJ family. Several terminals plaster your screen dropping red every few saves. Your standing desk with a walking treadmill is not enough to keep stress from your teammates at bay.

Watermelon is a Github App that gives you an AI summary of the work done on a PR so it’s a breeze to review, while bringing in any relevant links, so jumping the hoops is a click away.
Watermelon is also an IDE tool that allows you to contextually get the same results while you work so nothing gets lost in a sea of distractions. Try both now while keeping up with gitflow, for free!

Top comments (0)