In TFS there is an option to make baseless merge. This a kind of merge you want to do between two folders that you haven’t initially branched from each other. The smart part of this process is that when you make the baseless search, TFS is creating a ‘base’ for future merges so it can detect what have been changed specifically.

In ProPeople SCM infrastructure I am creating a number of builds responsible for each project. The idea is that each project gets build on demand by the QA or PM and it is automatically deployed on the development server. No manual steps required (except clicking to start the build :)).

After I created about 7 of those builds, it occurred to me that maintaining them would be very time consuming task in future. Especially, if you want to update all of them. So I decide to make them a base for future merge. Baseless merge can be done only with the command line tool so I run the command “tf merge /baseless”. For sourcepath I wrote the location of specially created template folder for my builds and for destpath I wrote the location in TFS of one of my already created builds. After running the command the IDE got notified of the change and show the folder with pending change – merge. I checked in the folder thinking everything was fine.

I decided to make a quick test and changed the template build file, checked it in and selected Merge to merge my changed. For my surprise the folder list for available Target branch to merge was empty.

After a little search I found out that I have to use the /recursive option for tf merge if I want to merge all the files in the folder also. Anyway, who is going to merge only the folder itself without all its contents.

Bottom line: when you use TF command line, do not forget to set the /recursive option for all operations that must be applied to all files in the selected folder.