Skip to main content
Question

What happens to exclusions during a merge?

  • September 15, 2026
  • 5 replies
  • 58 views

wallytax
Rookie
Forum|alt.badge.img

I have some changes in a DEVELOPMENT branch that I want to merge to the RELEASE branch. After creating the merge I exclude a particular line from being merged. What seems to happen after the merge is completed is that the excluded part is overwritten by the code from the RELEASE branch, so my original code is gone. Is this intentional? It looks like the merge is bi-directional.

5 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Software Architect
  • September 15, 2026

Hi,

I assume the DEVELOPMENT branch (DEV) is a branch from the RELEASE branch (REL). This means if you want to continue working in DEV and merge with REL, that you will need to perform a reciprocal merge.

This will merge all changes from DEV into REL and all changes in REL to DEV. Then both are the same at that point. REL contains the same objects as DEV after this reciprocal merge.

If you were to exclude actions from this merge session, these (DEV) actions will be excluded and not merged to REL, and the merge session will undo/revert these actions in the DEV branch as a reciprocal merge dictates that the branches are exactly the same at that point. Excluding an action is not limited to excluding it from the merge session, it will be reverted to its prior state.

The Merge impact shows the impact the merge session has on the Source and Target branch in a reciprocal merge, but that is seen from the point from the other branch. Excluding an action does not show up as a Revert insert (for example) of the object in the other detail tab.

So, in short, any excluded action in a reciprocal merge is reverted in the source/target branch as the state of the branches must be exactly the same after a reciprocal merge.

Hope this sheds some light on it! I also wrote a blog about merging and the considerations: 

 


wallytax
Rookie
Forum|alt.badge.img
  • Author
  • Rookie
  • September 15, 2026

Hi Mark, thanks for your quick reply. I don't want a reciprocal merge: I want the changes of DEV merged into REL, not vice versa. Is that possible?


Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Software Architect
  • September 15, 2026

I want the changes of DEV merged into REL, not vice versa. Is that possible?

Certainly, the DEV branch may not be protected in that case. Then you will be able to perform a merge from DEV to REL and Archive the branch after the merge session, or Finalize it and declare the branch definitive at that point.

To essentially close the branch, no other branches may exist that have DEV as their Origin; or in other words, branches that have been made from DEV. Only then, the Protected state can be turned off in Model overview > Branches by editing the record.

It is not possible to only merge changes from one branch to another without closing the Source branch or update it by the reciprocal merge, only in case of an Arbitrary branch that would be possible,

Info on these:
https://docs.thinkwisesoftware.com/docs/sf/branches#protect-a-branch

https://docs.thinkwisesoftware.com/docs/sf/merging#1-create-a-merge-session

https://docs.thinkwisesoftware.com/blog/2024_2#models---merge-changes-into-an-arbitrary-branch


Jeroen van den Belt
Administrator
Forum|alt.badge.img+10

Hi ​@wallytax,

Was Mark’s response sufficient to answer your question?


wallytax
Rookie
Forum|alt.badge.img
  • Author
  • Rookie
  • September 23, 2026

Hi ​@Jeroen van den Belt,

Thanks for asking, but I don't think I understand the branching mechanism, because it seems to be very different from what I am used to (GIT).

Mark mentions the protection of the branch. But if I understand it correctly that only applies to which users may make changes into which branch. I am not sure if this has to do with the data being reverted to its old state when excluding certain changes.

The part about the branches being reciprocal is a new concept for me and I don't know if it's possible to change that setting, unless it's the same as the "protected” setting, but I don't think it is.

Back to the main problem - which for me is a common situation - I have “accidentally” changed multiple things that actually needed to be in their own branch. I only want to merge a couple of changes in the DEVELOPMENT branch to the RELEASE branch and therefore I revert the other changes. After that those excluded changes are gone. Now I created a new branch originating from DEVELOPMENT and again made a little bit too many changes in it so I only want to merge a couple of changes to DEVELOPMENT, but I don't dare to since I will probably be loosing the other changes.

But I start to repeat myself, so I think I should be very keen on make the right changes in the right branch.