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.
- 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.
- Go back to Source Control Explorer and right-click the branch to be labelled. Go to Advanced –> Apply label
- In the drop-down, select Changeset and enter the change set number that you noted down earlier.
- 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!