Branch madness!



imageI know that I have not been posting in a while, and I hope to remedy that. I have been working on getting our internal team up to speed on using TFS as a full ALM tool and not just for source control. I am getting a lot of resistance on creating work items ( as this is a PM’s job !) but we are making progress.

I was off for the last couple of days and came back to a WTF moment. I noticed, upon opening my source control, that there were two “Main” folders. “Main” and “MainPreR1”.


Upon enquiring it turns out that a change had been made to “R1” (legitimate) to fix a Bug (loose definition, but a definition none the less). Then the “Main” folder had been renamed and a new “Main” folder branched from “R1” and 2 new Features branched from that, leaving all the other existing branches to fend for themselves.


If you are not sure what I mean, then let me explain. In order to merge from “F1207” into “Main” you would need to first merge it with “MainPreR1”, then merge it with “R1”, then merge it into “Main”. And thus you have just contaminated “R1” with something that is not in “R1” but should be in “R2”. On top of this the other orphaned features can’t take advantage of new features in “R2” without contaminating “R1”… messy.

As you can see from the screenshot on the right it is now under control, but it took the perpetrator the better part of the morning to get it sorted, and the are still putting the finishing touches to it (It is a good thing the do not let us have guns here in the UK). If you are interested, here are the steps that were performed to sort out this problem.

  1. Zip all content in  “Fxx1” and “Fxx2”. To safeguard the dev work.
  2. Delete branch “Fxx1” and “Fxx2” from source control
  3. Check in everything…
  4. Delete “Main” from source control. coz it is the crap one
  5. Check in everything
  6. Rename “MainPreR1” to “Main”. Which is the way it should have been.
  7. Check In Everything… Now we are back where we started.
  8. Merge “R1” into “Main”. This is the action that should have occurred in the first place.
  9. Check in everything…
  10. Create Branches for “Fxx1” and “Fxx1”
  11. Check in everything…
  12. Check out “Fxx1” and “Fxx1”.
  13. Copy archived “Fxx1” and “Fxx2” over the top of new branch.
  14. Check in everything…

A long way for a short cut 🙂

Well, at least the lesson is learned…

Technorati Tags:  

Create a conversation around this article

Share on Facebook
Share on Twitter
Share on Linkdin

Read more

Martin Hinshelwood
In organizational development and team dynamics, Agile (as the Agile Manifesto delineates) and Scrum (as the Scrum Guide outlines) guide teams not by solving their problems but by illuminating the issues that demand attention. These frameworks aim to identify and spotlight the challenges within a team or organization’s processes, effectively …
Martin Hinshelwood
This week, I participated in a Webinar hosted by Sabrina Love ( Product Owner) as well as my colleagues, Joanna Płaskonka, Ph.D. and Alex Ballarin to discuss the state of learning and how immersive learning is the future of training. You can watch the video below to hear what …
Martin Hinshelwood
For a long time now I have been searching for that perfect domain that epitomised the vision, the why, of what I am trying to achieve with my customers and the industry at large. Now I have found it in
Martin Hinshelwood
At the MVP Summit I was appalled by the number of people who asked questions about new features for supporting hierarchical tasks! I shared a disgusted look with Peter Provost and we had a quick (and I mean really quick) conversation that resulted in this post. it really comes down …