Skip to content

Commit 257a8af

Browse files
Merge pull request mendix#9115 from mendix/kk-peer-review
Kk peer review
2 parents a852df4 + 7edc83c commit 257a8af

2 files changed

Lines changed: 117 additions & 89 deletions

File tree

  • content/en/docs
    • refguide9/version-control/using-version-control-in-studio-pro
    • refguide/version-control/using-version-control-in-studio-pro

content/en/docs/refguide/version-control/using-version-control-in-studio-pro/merge-algorithm.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,31 @@ aliases:
1313

1414
## Introduction
1515

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.
1817

1918
When this happens, Mendix Studio Pro offers two ways to combine your changes with changes from the server: [Rebase](#rebase) and [Merge commit](#merge).
2019

2120
Both options support the following features when it comes to [resolving the conflicts](#resolve):
2221

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.
2625

2726
The differences between the two approaches are as follows:
2827

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.
3130
* 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.
3332
* 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.
3534
* Results in a more complicated commit history with extra merge commits.
3635
* Resolves conflicts once, regardless of the number of local and remote commits being merged.
3736

3837
{{% alert color="info" %}}
3938
In general, Mendix recommends using the Rebase strategy when combining changes, especially when actively collaborating on the same branch.
4039

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.
4241
{{% /alert %}}
4342

4443
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
4948

5049
### Starting Point
5150

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:
5352

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`.
5557

5658
{{< figure src="/attachments/refguide/version-control/using-version-control-in-studio-pro/merge-algorithm/DomainModel/Starting_State.png" >}}
5759

58-
### Local Changes, Your Work
60+
### Your Local Changes
5961

60-
During your work you make two changes, each one in separate commit.
62+
During your work you make the following changes, each one in separate commit:
6163

62-
In the first commit you rename `E_mail` to `Email`
64+
* Rename `E_mail` to `Email`.
6365

64-
{{< figure src="/attachments/refguide/version-control/using-version-control-in-studio-pro/merge-algorithm/DomainModel/First_Local_Commit.png" >}}
66+
{{< figure src="/attachments/refguide/version-control/using-version-control-in-studio-pro/merge-algorithm/DomainModel/First_Local_Commit.png" >}}
6567

66-
In the next commit you rename `Second_E_mail` to `Second_Email` to be consistent with previous change.
68+
* Rename `Second_E_mail` to `Second_Email`.
6769

68-
{{< figure src="/attachments/refguide/version-control/using-version-control-in-studio-pro/merge-algorithm/DomainModel/Second_Local_Commit.png" >}}
70+
{{< figure src="/attachments/refguide/version-control/using-version-control-in-studio-pro/merge-algorithm/DomainModel/Second_Local_Commit.png" >}}
6971

70-
### Server Changes
72+
### Another User's Changes
7173

72-
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.
7375

7476
{{< figure src="/attachments/refguide/version-control/using-version-control-in-studio-pro/merge-algorithm/DomainModel/Remote_State.png" >}}
7577

7678
### Summary
7779

78-
The current situation could be represent as shown below.
80+
The current situation could be represented as shown below.
7981

8082
{{< 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" >}}
8183

0 commit comments

Comments
 (0)