Git Workflow That Works for Me
The branching strategy I actually use (and why)
I've tried every Git workflow. Git Flow, GitHub Flow, trunk-based development. They all made sense in theory, but in practice, they felt like overkill for what I was doing.
So I simplified. I have one main branch, and I branch off it for features. When the feature is done, I merge it back. That's it. No develop branch, no release branches, no complex merging strategies.
For small projects and small teams, simple is better. I don't need multiple environments or complex release processes. I need to be able to work on features without stepping on other people's toes. Feature branches give me that. I can work on something, commit frequently, push when I'm ready. If I need to switch to something else, I can switch branches. Simple.
I try to keep branches small. One feature, one branch. If a feature gets big, I split it into smaller features. Small branches are easier to review, easier to merge, easier to understand. I also try to keep branches short-lived. A few days at most. If a branch is open for weeks, something's wrong. Either the feature is too big, or I'm not prioritizing it.
Sometimes simple isn't enough. For bigger projects or bigger teams, you might need more structure. But start simple, and add complexity only when you need it. I've worked on projects with complex Git workflows, and they made sense for those projects. But for most of what I do, simple works better.
The best workflow is the one you'll actually use. For me, that's something straightforward. For you, it might be different. The key is finding what works for your situation.
Note: This is a mock-up post created as part of the Feather blog template demonstration. The content is provided as an example to showcase the blog's features including markdown rendering, search functionality, tags, and more.
Feather is a blog template built for Next.js. You can use these example posts as a reference when creating your own content.