Should I avoid baseless merges in TFS?

13,511

Baseless merges should be avoided if at all possible. When you do a baseless merge, unlike a merge, you are disregarding the history of either side. Indeed you can merge two branches that are totally unrelated—and that can be dangerous.

The key is to create a branching strategy that allows you to not have to use that feature.

Share:
13,511

Related videos on Youtube

Robba
Author by

Robba

Hi, I'm Robert, I live in the Netherlands.

Updated on June 29, 2022

Comments

  • Robba
    Robba almost 2 years

    Simple question perhaps, but one I'm having a hard time finding the answer to. I often work at a client that uses TFS as source control and they completely avoid using the baseless merge feature of TFS source control

    In part because in the past it required a command line tool to do it, but possibly more important because when you do it now in the interface it shows you a yellow exclamation warning symbol that you are indeed performing a baseless merge.

    This sort of scares them off and makes them avoid it altogether. I've been searching around to figure out if there are any specific risks involved in baseless merges but I'm unable to find that out (or details on how baseless merges work underneath the hood)

    • Edward Thomson
      Edward Thomson about 9 years
      Let me turn this question around: why are you suggesting that they use a baseless merge? What does their branch structure look like that makes this is a common operation for them?
    • Robba
      Robba about 9 years
      Well, this customer uses a structure of branching from Main to Dev to Patches where it happens pretty often that several patches are in development at the same time but are not ready yet to be merged back up to Dev, but can sometimes be nice to share between the various patch branches as they are being developed. Just thought I'd use baseless merges for this.
  • Robba
    Robba about 9 years
    Yeah, I noticed when I tried to do a baseless merge that pretty much all (if not just plain all) changes result in a 'merge conflict' and should be manually resolved, even if it's just the one branch that has all the changes... Seems like another win for Git if you ask me...
  • Edward Thomson
    Edward Thomson about 9 years
    A "baseless merge", that is a three-way merge of two files without a common ancestor (or "base"), means that you can't identify what regions of a file are new and what are common. So it is going to produce conflicts in any system, be it Git or TFVC.
  • Mike Haas
    Mike Haas about 8 years
    "means that you can't identify what regions of a file are new and what are common. So it is going to produce conflicts in any system, be it Git or TFVC" Not exactly true. The problem is it needs to be a parent in TFSVC whereas git it can really be any ancestor.
  • Dennis T --Reinstate Monica--
    Dennis T --Reinstate Monica-- almost 5 years
    FYI for anyone confused by "three-way merge of two files" as I was, it refers to user Alice’s code, user Bob’s code and the base code on which both of them made changes. So if the default TFS merge tool, diffmerge, cannot determine the base, it will do a merge without a base i.e., baseless.
  • Jordan
    Jordan over 4 years
    There is no way around it when you have to do feature isolation. Feature toggle is far worse.