Skip to content

Commit 16d2754

Browse files
committed
Added branch-retain workaround
1 parent e34f4ed commit 16d2754

2 files changed

Lines changed: 288 additions & 240 deletions

File tree

content/en/docs/refguide/version-control/version-control-troubleshooting/repository-size.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,30 @@ The cleanup tool will reduce the size of the repository to a minimum, by only re
8585
Uncommitted work, or work committed to branches that have not been merged to the main branch, will be permanently removed from the repository.
8686
{{% /alert %}}
8787

88+
#### Workaround to Retain Branch Contents
89+
90+
During a cleanup, all branches apart from the main branch are removed. As it is not always possible to converge all branches by merging them into the main branch, you can manually back up branch contents and recreate them after the cleanup.
91+
92+
{{% alert color="info" %}}
93+
Mendix recommends to first attempt these steps on a dummy project to familiarize yourself with the process.
94+
{{% /alert %}}
95+
96+
Follow these steps:
97+
98+
1. For each branch you want to retain:
99+
100+
1. Check out the branch locally through Studio Pro.
101+
2. Merge the latest state of the main branch into the branch you want to retain. This ensures there is a common base, so you can resolve any conflicts on this branch after the cleanup.
102+
3. Commit and push your changes.
103+
4. Create a compressed .zip version of the entire project folder, except for the *.git* folder. Clearly name the .zip folder so you recognize which branch it represents afterwards.
104+
105+
2. Execute the cleanup and push the results to the server.
106+
3. Recreate the branches you wanted to retain. Do this before upgrading the main branch to a different Mendix version. For each branch:
107+
108+
1. Create a new branch from the main branch in Studio Pro and clone it locally.
109+
2. Overwrite the contents of the project folder, except for the *.git* folder, with the contents of the .zip.
110+
3. From Studio Pro, commit your changes with a *Branch recreated* message and push to the server.
111+
88112
#### Deciding on the Cleanup
89113

90114
The cleanup is intended to shrink your repository size to mitigate performance issues. We advise to first check whether you and your team are affected by performance issues, as that largely depends on your situation.

0 commit comments

Comments
 (0)