In a previous Tech Tip, we talked about how to successfully merge in Onshape.

But with the recent Onshape update (1.151), new functionalities have been added that give a lot more flexibility and control over the merge operation. 

Today's Tech Tip will show you how to use the new Selective Merge tool to better understand the effect of a merge and be more productive in Onshape. 

The Selective Merge Tool

When working with lots of branches and lots of changes across different Part Studios, Assemblies, Drawings, and other tabs, it is sometimes difficult to know exactly what the effect of a merge will have on your document.

Now when you commit a merge operation, Onshape will provide you with a new interface to help you understand the effects of merging one branch with another. This will make it possible to allow for selective, per-tab merge operations.

Overall Merge Strategy Screen

The Overall Merge Strategy screen presents labels across the top that set default choices for the tab merge strategy within the document. 

When you merge a selected “source” (workspace or version) into the currently active “target” (workspace), there are three options available to you: 

  • Keep [Target]: Changes in the target field are kept.

  • Merge changes: This is the default. Changes in both the “source” and “target” are merged.
    When merging changes, the base of the merge is either the change at which the branches diverged (for example, the version where the branch was created) or, if it exists, the last point where the same “source” branch was previously merged into this “target” (provided that merge was not reverted).

  • Replace with [Source]: Changes in the “source” will replace changes in the “target”.

Merge Strategy Setting

Per Tab Strategy

Optionally, you can select a merge strategy for each tab to override Overall Merge Strategy settings. The merge strategy options are the same as the Overall Merge Strategy except where a tab is created or deleted, or for tab types that don’t support merge changes from both options.

overall merge strategy options

Overall Merge Strategy Legend

Helpful indicators are displayed to give you information about the expected result of the merge. 

  • A change with a green checkmark icon ( Green accept checkmark icon) indicates edits to the tab in that workspace are kept in the “target” workspace after the merge. (In the example, changes made in both workspaces are kept for the throttle body Assembly and Part Studio).

  • A change with a red X icon (Red cancel icon) indicates that discarded edits (deleted features, for example) in the workspace tab are kept in the “target” workspace after the merge.  

  • A change denoted with an exclamation mark icon () indicates the tab will not exist in the “target” workspace after the merge.

  • An information icon (Information icon) indicates that for this tab type, changes from separate branches can’t be merged (a drawing, for example). You must select either the “target” (Keep [Target]) or “source” (Replace with [Source]). Head to our documentation page to learn about the tabs where changes from separate branches can’t be merged.

Pro Tip: Remember that if the result of the merge is not what you expected, you can always restore the document prior to the merge event.

This Tech Tip helped you learn how to control the effect of a merge using the Selective Merge tool.  

Interested in learning more Onshape Tech Tips? You can review the most recent technical blogs here.