Most devs are aware, that Git Branches are awesome for developing new features collaboratively in complex apps. For personal projects, I've seen most devs pushing everything to master, tho.
Is this because devs being lazy and lack proper project organization or do you also think branching in personal projects is unnecessary?
Even if you work alone, I still see them as useful, especially if you develop new features and have a master branch in production.
Latest comments (51)
Always! In fact it’s easy to go back in history and compile features from an RC for a client when they are properly tagged and merged back into Master.
For apis for example targetting Heroku CD, I have at least a dedicated branch
I never used to, basically only worked on smaller solo personal projects and didn’t see the need.
I do now, as my projects are getting bigger and often have some kind of continuous integration on Main branch.
Personally I don’t think it’s needed for smaller solo projects for anything other than to get comfortable with using git processes, but for that alone it is worth it.
I use git flow for most of my personal projects. So, I have a prod branch and a develop branch. When I've got a new version, I merge develop into prod.
I will occasionally create feature branches, if I know it might take a while to work on it. But most small stuff is put into the develop branch directly.
If anybody else were working on it, I'd be more strict and always use a feature branch.
For stuff like my blog or personal website, I only have a single branch. I don't push until I've got it ready. If I'm working on a blog post on one computer, and want to switch computers to finish it, then I'll create a branch and push it there.
I use a branch to do the work and then I send myself a PR to merge to main. This forces me into a context shift from "developer" to "reviewer". There's a lot of things my eyes will just drift past in my editor that I will flag when I'm explicitly doing quality control.
I also do this. One main branch and thousands of short-lived feature branches (e.g.
enhance/add-profile-component) which get closed immediately after PR.Yes, i always use a git flow like approach. Except small projects that are used only once and done in an hour or two.
Yeah, with PRs and CI/CD so I can make sure that even my dopey little project only gets deployed if it's actually working properly.
Yes, but mostly for bigger experiments (new layouts, changing libs, upgrading main framework), when I want to be able to still do quickfixes on main/master when needed.
never -- straight to master!
What's the reasoning behind using branches in a solo side project?
I use PR for CI purposes because it is easier to track down failing tests with PRs. And you cannot open PR without a branch!