TFS Branching (Warning: Lots of Screen Shots)

For my carpool project, I attempted to create a branching strategy based on the ALM Ranger’s recommendations of a basic strategy (main, dev, release).  For my 1st task, I attempted to branch for the new feature set. However, after 1 hour, I realized that I set up my TFS projects incorrectly. I went ahead and deleted all of my project groups EXCEPT the default one. From there, I added a new Carpool Project.

 

image

image

image

Note that creating the project is a TFS-specific action, the actual file system has not been altered yet. I then needed to add this project to my file system:

image

image

Note that I added it to the Root folder for my VS2010 Projects. All of the child branches will be off of this.

image

Right now in the folder, there is nothing there (except for the build process templates).

The quick start guide for VSTS Ranger team recommends 3 branches – Main, Dev, and Release. Following that guide, I created the Main Branch off of the root and then the Development and Release branches off of Main.

image

An interesting TFS bug (I mean feature) is that if you make a new folder and then click out of VS2010, the folder is still created on the file system, but not in the Source Control Folder.

Under each branch, the guide recommends having a Bin, Docs, and SRC (Source) directory. Since I am not using a build agent (yet), this seems unnecessary. I put my source code directly in the Main branch on the file system:

image

I then added the files to the folder:

image

image

I now have my original source files in the Main Folder.

I then checked in the 118 files.

I then converted the Mian Folder to a Branch -> according to the documentation, it allows me to see it in the designer.

image

I then needed to create 2 branches off of the Main – Development and Release

image

Then I had to get latest version:

image

Automagically, 2 things happen.

My Development Folder was created into a Branch:

image

In addition, all of the main branches files were copied over to the development branch:

image

I did the same with the Release branch

Volia: 3 branches:

image

And 2 are subordinate to the Main as you can see by clicking on properties on Main and selecting Relationships:

image

 

image

And also, for the capstone:

 

image

 

image

I think I have things set up right – though I don’t think I need Main and Release files on my file system – just development. In any case, I will now try and branch to the globalization change set.

Before starting on Version 1.1 (Gloabization), I wanted to see if I could make changes correctly. I checked out the Production Version and made 1 change to the master page (added a trademark symbol).

I incremented the file and assembly version:

image

And I checked in the file

I then went to Version Control Explorer and Added a Label:

image

I then Merged the Release branch up to the Main branch:

image

I then went to Main branch and checked in the pending changes:

image

And the changes are now in Main and Release – Yippie!

I then merged the changes into Development. I went ahead and made the changes in development to see how the merge tool handles it:

image

And it is flat out awesome!

The only thing I need to keep in mind is that I might have the development branch solution in VS2010 and working with the version control explorer, forget that and think I am in a different environment.

Note that I will release from the Release Branch, not the Main branch…

I am now ready to start Globalization…

Advertisements

One Response to TFS Branching (Warning: Lots of Screen Shots)

  1. Pingback: Starting back up with TFS « Rob Seder's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: