[TFS] Label older code base in TFS branch despite new check-ins

Hi,

Consider a scenario where you need to label a TFS branch at end-of-day everyday and you missed labelling it yesterday and today there are quite a number of check-ins already committed in the branch. How do you label yesterday’s code base then?

TFS provides a very easy way to label branches and solution to above scenario also exists. Follow the below steps to label the older code base.

  1. Right-click the TFS branch to be labelled and click on View History. Note the last changeset number at which you want to label the branch.
  2. Go back to Source Control Explorer and right-click the branch to be labelled. Go to Advanced –> Apply label
  3. In the drop-down, select Changeset and enter the change set number that you noted down earlier.
    Branch_Label
  4. Enter the label name of your choice and then click on create.

Now the TFS branch code base is labelled at the level of the last changeset which we entered. To verify the labelled code, compare the latest version of the code with the labelled code that you just created. There have to be differences and these differences will be that of the check-ins made AFTER the change set noted down above.

Hope this helps!

Leave a Reply

Your email address will not be published. Required fields are marked *