Comments on: Simple Branching Strategy Part 2: Implementation https://simpleprogrammer.com/simple-branching-strategy-part-2-implementation/ Fri, 13 Apr 2018 16:21:00 +0000 hourly 1 https://wordpress.org/?v=7.0 By: Chris https://simpleprogrammer.com/simple-branching-strategy-part-2-implementation/#comment-183 Thu, 05 Apr 2012 21:26:24 +0000 https://simpleprogrammer.com/?p=915#comment-183 It’s a tough call. A more granular branch and merge strategy is always better. The problem is that it takes more resources. This is a huge problem, not just an annoyance. Time is money and the larger your code base and the more branches you have and the more versions you support, the more it gets out of control. If you have the resources to manage it, like Microsoft, then go for it, but most companies now-a-days need to be nimble and efficient so tell your seniors they need to KISS the process (as in Keep It Simple Stupid).

Thanks for a great article

]]>
By: Wes https://simpleprogrammer.com/simple-branching-strategy-part-2-implementation/#comment-182 Sun, 11 Dec 2011 16:39:43 +0000 https://simpleprogrammer.com/?p=915#comment-182 In reply to jsonmez.

Thanks. I didn’t think about about tagging. We use TFS here, and this has become a much discussed topic in the past couple days. After reading this, I was on board. I hate all the merging back and forth between the trunk and dev that happens in the standard branching strategy; it’s always seemed very sloppy to me,, so I’m ready to implement this. Sadly, my seniors don’t agree 🙁

]]>
By: jsonmez https://simpleprogrammer.com/simple-branching-strategy-part-2-implementation/#comment-181 Fri, 09 Dec 2011 14:06:11 +0000 https://simpleprogrammer.com/?p=915#comment-181 In reply to Wes.

Hi Wes,

Good question. If you want to preserve the branch before the merge was done, you can do 1 of 2 things.
1. Just use the prior SVN number (assuming you are using SVN, before the merge)
2. Just tag right before the merge.

I try to keep it simple and don’t tag unless I am finding that I am historically needing to do this.

]]>
By: Wes https://simpleprogrammer.com/simple-branching-strategy-part-2-implementation/#comment-180 Thu, 08 Dec 2011 18:35:11 +0000 https://simpleprogrammer.com/?p=915#comment-180 I’m a bit late to this discussion, but I have a question about loosing historical builds with this model. In this example, once I’ve merged hotfix 1 back into my release 1 branch, I have completely lost that build as it existed before the hotfix. In an ideal world, every time I created a hotfix it would only fix exactly that one bug, and it would be tested completely and work stupendously before I merged back in to release 1. But we don’t live in an ideal world, people make mistakes, and sometimes I might just need to get back to release 1 as it existed before hotfix 1. I love the simplicity of this model, but I see that as a serious drawback. Is there any way around this or maybe something I’m just not understanding here? Thanks.

]]>
By: Tim https://simpleprogrammer.com/simple-branching-strategy-part-2-implementation/#comment-179 Thu, 08 Sep 2011 15:17:09 +0000 https://simpleprogrammer.com/?p=915#comment-179 In reply to RobH.

I think the example has shown that hot fixes “can” be RI’d to the trunk. So there is no more risk than what is being done in today’s traditional branches. The same could happen in a dev, main, prod branch setup where fixes in the prod branches may not RI back to main. This is something that has to be managed whether your setup is like John’s or you have a more traditional Dev –> Main –> Prod style.
Also, remember the importance of labels within branching. Most SC gatekeepers worry about losing snapshots or the ability to revert back when simplifying branching. Labels can help alleviate these concerns.

]]>
By: jsonmez https://simpleprogrammer.com/simple-branching-strategy-part-2-implementation/#comment-178 Tue, 15 Jun 2010 19:41:39 +0000 https://simpleprogrammer.com/?p=915#comment-178 In reply to RobH.

Not always do you apply a fix from a previous release to the new release. Sometimes for the new release you do a different fix, that is more appropriate. The old release fix might be a panic “have to just get this working with duct tape” type of fix that you don’t want to move forward. You want to fix it the right way for the next release.

You are right about legacy code, but shouldn’t we move in this direction? Even if we can’t get there right now. We should have our goals set on this kind of simple branching strategy and figure out how to get there.

Thanks for the comments.

]]>
By: RobH https://simpleprogrammer.com/simple-branching-strategy-part-2-implementation/#comment-177 Tue, 15 Jun 2010 19:38:10 +0000 https://simpleprogrammer.com/?p=915#comment-177 Nice couple of posts with some stuff to “chew on.” A couple of thoughts.

First, I’m struck that in your example Release2 reintroduces the bug that Release1 HF1 was supposed to fix. There’s nothing in this process that prevents that from happening.

Second, legacy applications (which I would argue is what the majority of developers work on) rarely have a robust set of tests – or an architecture that even supports testability. So while CI and automated testing will eventually train the team to keep trunk in a ready to release state it may be a good long while before you hit the tipping point where that’s realized. In the meantime branch-by-feature seems like a reasonable middle way.

Regards,
Rob

]]>
By: jsonmez https://simpleprogrammer.com/simple-branching-strategy-part-2-implementation/#comment-176 Fri, 11 Jun 2010 16:17:42 +0000 https://simpleprogrammer.com/?p=915#comment-176 In reply to Peter Gfader.

Thanks Peter,

About #3. What I mean there is that you shouldn’t create code that is sloppy with the idea that you will go back later and fix it. I agree 100% about being a boy scout developer.

I am trying to say there that someone should not check in code that hasn’t been refactored, or hasn’t had static code analysis violations that they know about cleaned up with the thought of coming back to it later.

]]>
By: Peter Gfader https://simpleprogrammer.com/simple-branching-strategy-part-2-implementation/#comment-175 Fri, 11 Jun 2010 15:57:49 +0000 https://simpleprogrammer.com/?p=915#comment-175 #1 +1
Couldn’t agree more with this strategy.
I was actually thinking that this strategy is done by everyone, because its so simple and easy… but it doesn’t seem so.

#2
Automated test are VERY important … you said it twice already 😉

#3 -1
>>Don’t go back and clean up code later.
>>Write it right the first time
Cant agree with that one. It is very hard to get everything right the 1st time.
Be a boy scout developer!
-Fix code when you see something not nice
-Checkin small changes

Follow the boy scout rule:
Leave the campground cleaner than you found it.

.peter.gfader.
http://blog.gfader.com/
http://twitter.com/peitor

]]>
By: Darrell https://simpleprogrammer.com/simple-branching-strategy-part-2-implementation/#comment-174 Tue, 08 Jun 2010 16:30:19 +0000 https://simpleprogrammer.com/?p=915#comment-174 This is exactly the strategy we use on our team, and it works great. I definitely agree with every point in the “How to be successful” section, but can’t overemphasize the importance of being able to run your tests locally in this scenario though – we put a bit of effort into making sure our automated tests (mixture of NUnit and Fitnesse) will not only run locally, but are easy to run locally, so we can test as much as possible before checking in. Before this was setup well, we had a hard time keeping the build green.

One other thing to note with this approach is that it’s so unbelievably easy that new members to the team are brought up to speed instantly. What’s an easier branching strategy than don’t branch if you don’t need to?

]]>