web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

A merge relationship does not exist between the source and the target

(0) ShareShare
ReportReport
Posted on by 4,131

Hi,

I create a new branch "Release", and right click from Dev branch -> Branching and Merging -> Merge.

On the source branch, I specified the $project name/Trunk/Dev, and in the target branch $project name/Trunk/Release

However, the Visual Studio show a warning "A merge relationship does not exist between the source and the target. A baseless merge will be performed". Where can I set up the merge relationship?

Thanks,

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    The message means that your Release branch is not created from Dev branch -> there is no relationship between the branches. You can still merge code from Dev to Release. But why not merge Dev -> Main -> Release since you will anyway need it also in Main branch? This way you will not get the warning.

  • Yuji Profile Picture
    4,131 on at

    So if I created Release branch from Dev branch, this creates a parent-child relationship? And Dev is a parent branch, and Release is a child branch?

    And what is the benefit to have this relationship? It seems I can still merge from Dev to Release even they don't have any relationship?

  • Verified answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    You should not create a Release branch from Dev branch. Instead you should create it from Main branch (since that's where your release code is).

    You can still merge from Dev to Release. I think the main impact of baseless merge is that automatic conflict resolution is not as good as it is with a "non-baseless" merge.

  • Verified answer
    Sukrut Parab Profile Picture
    71,710 Moderator on at

    If you right click on the branch and click advance properties you can see the relationships where you can see how the branch is created.  You should be able to do merge from dev > release though. While merging did you click on metadata folder for directly branch ? make sure you click on metadata folder and target branch work space is selected , if you have separate work spaces configured.

  • Verified answer
    Blue Wang Profile Picture
    on at

    Hi Yuji,

    You should merge from Release  into its logical parent, Main, and then from Main into its logical child Dev.

    If you need to merge between branches that do not have a direct parent-child relationship, you need to perform a baseless merge.

    That's the tip you see.

    Please read these :

    kampanchal.blogspot.com/.../baseless-merge.html

    stackoverflow.com/.../how-to-merge-tfs-changeset-from-branch-a-to-branch-c-branch-a-was-merged-into-b

  • Yuji Profile Picture
    4,131 on at

    Since I did not create a branch from Dev to Release, how can I manually add the parent-child relationship between these two branches?

  • Verified answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    You can't and you don't need to.

    You can either do a baseless merge from Dev to Release, or first merge from Dev to Main, and then from Main to Release.

    Don't you need that code in Main, for the next release? So why not merge Dev - Main - Release as suggested. Or, if you really don't want this code in Main (= your next release) just merge from Dev to Release.

    You can't add the parent branch relationship that doesn't exist. Just like a human child's biological parent can't be changed afterwards. You branched Release from Main so Main is forever the parent/origin of Release.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans