<p>A common approach I see on software projects is where Developers create separate Git branches for each task they work on.</p>
<p>This commonly matches issues or ticket on a sprint board or issue tracker.</p>
<p>Each ticket is worked on independently and merged into a long-lived mainline branch once complete.</p>
<p>This type of approach is commonly called Git Flow or GitHub Flow.</p>
<p>It's something <a href="/presentations/git-flow">I've given presentations</a> on in the past.</p>
<p>A common downfall is that different branches can conflict with each other - either due to a merge conflict where the same lines are changed in different branches, or incompatible code is written that works separately but not when merged together.</p>
<p>I used to work this way, even when working on projects as the only Developer.</p>
<p>One time, I was demoing two features to a client and needed to switch branches and doing so broke what it was trying to show.</p>
<p>These days, I avoid conflicts between branches by not branching.</p>
<p>Everyone works on a single branch and pulls and pushes changes regularly.</p>
<p>If you're <a href="/daily/2025/02/17/ci-cd">doing continuous integration</a>, that should be once a day as an absolute minimum.</p>
<p>I do <a href="/atdc">test-driven development</a> and usually commit after each passing test.</p>
<p>If you work on a single branch and pull and push changes regularly, you're much less likely to get merge conflicts and Developers can focus on pushing code instead of fixing merge conflicts.</p>
format:full_html
processed:|
<p>A common approach I see on software projects is where Developers create separate Git branches for each task they work on.</p>
<p>This commonly matches issues or ticket on a sprint board or issue tracker.</p>
<p>Each ticket is worked on independently and merged into a long-lived mainline branch once complete.</p>
<p>This type of approach is commonly called Git Flow or GitHub Flow.</p>
<p>A common downfall is that different branches can conflict with each other - either due to a merge conflict where the same lines are changed in different branches, or incompatible code is written that works separately but not when merged together.</p>
<p>I used to work this way, even when working on projects as the only Developer.</p>
<p>One time, I was demoing two features to a client and needed to switch branches and doing so broke what it was trying to show.</p>
<p>These days, I avoid conflicts between branches by not branching.</p>
<p>Everyone works on a single branch and pulls and pushes changes regularly.</p>
<p>If you work on a single branch and pull and push changes regularly, you're much less likely to get merge conflicts and Developers can focus on pushing code instead of fixing merge conflicts.</p>