Kwasi Date-Bah
Kwasi Date-Bah

Reputation: 1

How to do a baseless merge or otherwise take away the need for a baseless merge?

I have created a branched copy of my main production code-base so that I can safely perform development. This involved creating a Main branch (the parent) and then another branch on the same level for my development called Dev(the child).

I have managed the merge the content from my child branch to my parent branch. However, when I try and merge from my parent branch to my non-branched Production code base, I encounter problems.

I have attempted peforming a baseless merge using the Developer Command Prompt for Visual Studio 2017 Professional edition.

Do I need to do anything else such as converting my Production Code base to a branch. Then to re-parent the main branch and choose the new Production Code base branch as a parent, and perform the remaining merge that way ?

Is that the best way to accomplish my final merge ?

Upvotes: 0

Views: 874

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51083

First, if your Production Code base are still folders not a branch. You should convert them to a branch first.

In TFVC, you could only merge to directly related branches(parent or child). There is no merge relationship between main branch and new Production Code branch in your case . You have to perform a baseless merge through tf merge command.

tf merge /baseless <<source path>> <<target path>> /recursive 

/baseless

Performs a merge without a base version. That is, allows the user to merge files and folders that do not have a merge relationship. After a baseless merge, a merge relationship exists, and future merges do not have to be baseless.

Note Baseless merges cannot delete files in the target. You can manually carry over such changes.

If you want to reparent to other branch, you must set a relation ship between the 2 branches first.

In other words, you still need a baseless merge first. Afraid, we could not take away the need for a baseless merge. As for how to reparent branch in TFVC, you could refer my answer in this link: TFS reparent to be a grandchild

Upvotes: 1

Related Questions