You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/refguide/version-control/using-version-control-in-studio-pro/merge-algorithm.md
+23-21Lines changed: 23 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,32 +13,31 @@ aliases:
13
13
14
14
## Introduction
15
15
16
-
While working on your changes you may find that your local copy of the app model doesn't have all the changes that other team members have [committed](/refguide/commit-dialog/) to the server (the [Mendix Team Server](/developerportal/general/team-server/), or an [on-premises server](/refguide/on-premises-git/)).
17
-
In Git terminology this is called 'being behind'.
16
+
While working on your changes you may find that your local copy of the app model does not have all the changes that other team members have [committed](/refguide/commit-dialog/) to the server (the [Mendix Team Server](/developerportal/general/team-server/), or an [on-premises server](/refguide/on-premises-git/)). In Git terminology this is called being behind.
18
17
19
18
When this happens, Mendix Studio Pro offers two ways to combine your changes with changes from the server: [Rebase](#rebase) and [Merge commit](#merge).
20
19
21
20
Both options support the following features when it comes to [resolving the conflicts](#resolve):
22
21
23
-
***Fine-grained conflict resolution** – When there are conflicting changes in a document, you do not have to choose between whole documents, resolving a conflict using your change or using their change. Instead, you can resolve conflicts at the level of individual elements, such as widgets, entities, attributes, or microflow actions. All non-conflicting changes from both sides are accepted automatically.
24
-
***No conflicts on changes to lists of widgets** – When two developers make changes to widgets in the same document there is no conflict, the changes are combined. However, if the changes are made too close to the same place in the document, a **list order conflict** is reported that reminds the developer who is merging the changes to decide on the final order of the widgets in the list.
25
-
*Can be aborted at any time. Studio Pro will continue from your latest local commit.
22
+
* Fine-grained conflict resolution – When there are conflicting changes in a document, you do not have to choose between whole documents, resolving a conflict using your change or using their change. Instead, you can resolve conflicts at the level of individual elements, such as widgets, entities, attributes, or microflow actions. All non-conflicting changes from both sides are accepted automatically.
23
+
* No conflicts on changes to lists of widgets – When two developers make changes to widgets in the same document there is no conflict, the changes are combined. However, if the changes are made too close to the same place in the document, a list order conflict is reported that reminds the developer who is merging the changes to decide on the final order of the widgets in the list.
24
+
*They can be aborted at any time. Studio Pro will continue from your latest local commit.
26
25
27
26
The differences between the two approaches are as follows:
28
27
29
-
* Rebase (*default*):
30
-
* Treats changes from the server as leading, by first retrieving the server state and then reapplying your work to it.
28
+
* Rebase (default):
29
+
* Treats changes from the server as leading, by first retrieving the server state, and then reapplying your work to it.
31
30
* Results in a simple commit history.
32
-
* Resolves conflicts when reapplying your local commits. If you have 3 local commits, this could trigger conflict resolution 3 times.
31
+
* Resolves conflicts when reapplying your local commits. If you have three local commits, this could trigger conflict resolution three times.
33
32
* Merge commit:
34
-
* Treats local and remote changes equally, and combines them in a separate 'merge commit'.
33
+
* Treats local and remote changes equally, and combines them in a separate merge commit.
35
34
* Results in a more complicated commit history with extra merge commits.
36
35
* Resolves conflicts once, regardless of the number of local and remote commits being merged.
37
36
38
37
{{% alert color="info" %}}
39
38
In general, Mendix recommends using the Rebase strategy when combining changes, especially when actively collaborating on the same branch.
40
39
41
-
In exceptional cases, for example when you have a lot of local commits where you expect conflicts, a merge commit might be the better choice.
40
+
In exceptional cases, for example when you have a lot of local commits where you expect conflicts, a merge commit may be the better choice.
42
41
{{% /alert %}}
43
42
44
43
Both processes are guided by [notification controls](#notifications) showing the actual state and possible next steps.
@@ -49,33 +48,36 @@ The clearest way to explain and illustrate the differences between Rebase and Me
49
48
50
49
### Starting Point
51
50
52
-
There are two entities `User` and `Game` which you have added to the domain model of your project.
51
+
To start this scenario, let us assume that you have added the following entities to the domain model of your project:
53
52
54
-
The User entity includes string attributes `E_mail` and `Second_E_mail`.
53
+
*`User`
54
+
*`Game`
55
+
56
+
The User entity includes the string attributes `E_mail` and `Second_E_mail`.
In the meantime, your colleague also decided to make some changes to both email fields. They have renamed `E_mail` to `EmailAddress` and removed `Second_E_mail` entirely. These changes have been pushed to the server.
74
+
In the meantime, your colleague also decided to make changes to both email fields. They have renamed `E_mail` to `EmailAddress` and removed `Second_E_mail` entirely. They have then pushed their changes to the server.
The current situation could be represent as shown below.
80
+
The current situation could be represented as shown below.
79
81
80
82
{{< figure src="/attachments/refguide/version-control/using-version-control-in-studio-pro/merge-algorithm/Steps/Rebase_Starting_state.png" alt="Team Server with three commits (1, 2, and 4), while in Studio Pro there are also three commits (1, 3, and 5)" width="525" >}}
0 commit comments