This is more of a question than a blog post but here goes!
I have in TFS a Main branch and a Dev branch. Dev is unstable, with my teammates checking in code continuously. When a feature is complete and the testers have OK'd it, it is the developer's responsibility to merge the changes to Main.
I try to urge my teammates to keep check-ins on the Main branch atomic, i.e. One Feature One Check-In. This is to ensure that when we get to release branch time, it is easy to see which are the new features since the last release.
However, this is difficult to do in TFS, it seems.
Say I have been working on a feature for a couple of weeks, doing lots of small check-ins on the Dev-branch. Other developers are also doing the same. When it comes time to merge my completed feature to Main, I use the "Selected Changes" option to cherry-pick my check-ins. However, TFS does not allow me to select non-consecutive change sets. Therefore, I have to select them one by one and merge them to my local Main. This is where the problem arises. When I have changed the same file through multiple check-ins (you know, refactoring etc.), TFS just tells me that I have conflicting local changes and that I should check those in before continuing. This means that I cannot merge my feature to Main as one atomic check-in.
I would really like to keep checking in to Dev as often as possible and not really care that the check-in history on that branch is "dirty". Nevertheless, when it comes time to move features to Main I think a nice, clean check-in log would be awesome to have.
My question is how do I do this? My environment is VS2013 and the TFS server is running 2012.