Skip to content

Commit 121d094

Browse files
Merge pull request #10388 from tknippenberg/patch-59
Revise Git merging instructions for *.mpr* files
2 parents d4c3405 + e3f7e30 commit 121d094

2 files changed

Lines changed: 4 additions & 58 deletions

File tree

  • content/en/docs
    • refguide10/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/_index.md

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -331,36 +331,9 @@ The second method should be used if the first method is not possible for some re
331331

332332
#### Merging Using Git in the Command Line
333333

334-
For merging *.mpr* files using Git in the command line to work, it is necessary to attach *mx.exe* merge to Git as a driver.
334+
Merging using Git in the command line or a third-party tool is not supported after the introduction of [MPRv2](/refguide/troubleshoot-repository-size/#mpr-format). External tools cannot correctly merge the *.mpr* and *.mxunit* files, which can lead to a corrupted branch.
335335

336-
When doing a **git merge** operation on two branches in the command line, Git attempts to merge the binaries of *.mpr* files, which does not work. You need to apply Studio Pro merge algorithm and that is where *mx.exe* as a driver is needed.
337-
338-
Navigate to the *.gitconfig* file in C:/Users/[USER_NAME] and add the following:
339-
340-
```text
341-
[core]
342-
attributesfile = ~/.gitattributes
343-
[merge "custom"]
344-
name = custom merge driver for specific files
345-
driver = [MX.EXE_PATH] merge %O %A %B
346-
```
347-
348-
`[MX.EXE_PATH]` should be replaced by the *mx.exe* path with only forward slashes pointing to a drive using `/C/` instead of `C:/`.
349-
350-
You can also configure the Git driver locally per repository using the following commands:
351-
352-
```text
353-
git config merge.custom.name "custom merge driver for specific files"
354-
git config merge.custom.driver "[MX.EXE_PATH] merge %O %A %B"
355-
```
356-
357-
After setting up the driver either locally or globally, create a *.gitattributes* file in the same folder with the following contents:
358-
359-
```text
360-
*.mpr merge=custom
361-
```
362-
363-
Save the files and now when **git merge** is run and it involves *.mpr* files, the *mx.exe* merge will run Studio Pro merge algorithm before Git finishes the merge.
336+
In a future release, we are planning to introduce a separate command as part of the [mx Command-Line Tool](/refguide/mx-command-line-tool/) to allow merging on the command line.
364337

365338
### Branching Best-Practices {#branching-best-practices}
366339

content/en/docs/refguide10/version-control/using-version-control-in-studio-pro/_index.md

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -331,36 +331,9 @@ The second method should be used if the first method is not possible for some re
331331

332332
#### Merging Using Git in the Command Line
333333

334-
For merging *.mpr* files using Git in the command line to work, it is necessary to attach *mx.exe* merge to Git as a driver.
334+
Merging using Git in the command line or a third-party tool is not supported after the introduction of [MPRv2](/refguide/troubleshoot-repository-size/#mpr-format), which is the default format as of Studio Pro 10.22. External tools cannot correctly merge the *.mpr* and *.mxunit* files, which can lead to a corrupted branch.
335335

336-
When doing a **git merge** operation on two branches in the command line, Git attempts to merge the binaries of *.mpr* files, which does not work. You need to apply Studio Pro merge algorithm and that is where *mx.exe* as a driver is needed.
337-
338-
Navigate to the *.gitconfig* file in C:/Users/[USER_NAME] and add the following:
339-
340-
```text
341-
[core]
342-
attributesfile = ~/.gitattributes
343-
[merge "custom"]
344-
name = custom merge driver for specific files
345-
driver = [MX.EXE_PATH] merge %O %A %B
346-
```
347-
348-
`[MX.EXE_PATH]` should be replaced by the *mx.exe* path with only forward slashes pointing to a drive using `/C/` instead of `C:/`.
349-
350-
You can also configure the Git driver locally per repository using the following commands:
351-
352-
```text
353-
git config merge.custom.name "custom merge driver for specific files"
354-
git config merge.custom.driver "[MX.EXE_PATH] merge %O %A %B"
355-
```
356-
357-
After setting up the driver either locally or globally, create a *.gitattributes* file in the same folder with the following contents:
358-
359-
```text
360-
*.mpr merge=custom
361-
```
362-
363-
Save the files and now when **git merge** is run and it involves *.mpr* files, the *mx.exe* merge will run Studio Pro merge algorithm before Git finishes the merge.
336+
For Mendix 11, a command will be introduced as part of the [mx Command-Line Tool](/refguide/mx-command-line-tool/) to allow merging on the command line.
364337

365338
### Branching Best-Practices {#branching-best-practices}
366339

0 commit comments

Comments
 (0)