- Troubleshooting Repository Size
Explains consequences and root cause of a large repository size and how to mitigate this.
Mendix Studio Pro contains a version control system that supports collaborating with team members. This document describes issues and limitations with Git version control and their workarounds.
For more information and general help on version control, see the following documents:
Mendix Studio Pro needs to connect to the Team Server, where all your apps are stored. If you are having issues connecting to the Team Server, see Troubleshooting Team Server Issues.
You may get the error The project contains changes that have not been committed yet. Please commit first before attempting to merge again. when you feel there are no uncommitted changes.
This happens due to line endings in CSS files not being handled properly. Thus, sometimes after reverting all changes or applying other version control operations, the css.map files show up in the Changes on Disk dialog box. To prevent the css.map being flagged as changed you can perform the following workaround:
.gitattributes file in the \theme-cache folder of your application (if you have a Windows machine, make sure that a .txt extension is not applied by default).* text eol=lfFrom now on, Git will store the files with the correct line endings and this will not be seen as a change.
.gitattributes file in those branches as well.
Studio Pro communicates with version control Git repositories by two means: the LibGit2 library and the Git command line interface (Git CLI). LibGit2 provides a nice and clean repository object model that is in intensive use during local repository operations. However, it is not performant enough when it comes to communication with remote Git servers. This is when the Git CLI is used and Studio Pro switches to this client while performing fetch, pull, and push operations (that is why the Git for Windows package, which ships Git CLI to your computer, is an integral part of the Studio Pro installation). Therefore, any operation that requires transferring data to or from remote Git repositories, uses the Git CLI client.
Unfortunately, Git for Windows is not synchronized with the system proxy settings by default, which means it may be tricky to integrate it into Studio Pro seamlessly. We are trying our best to provide integration as soon as possible but, as a workaround, you can configure the Git version control proxy settings directly by either overriding http_proxy, https_proxy, and all_proxy (for more information, see the Git documentation), or by setting the proxy URL in your local .git/config using the following commands:
Configure the proxy settings:
git config --local http.proxy [protocol://][user[:password]@]proxyhost[:port]
Check that the setting has changed:
git config --local http.proxy
You can also use the --global modifier to apply the changes system-wise, but this is not recommended if you are using Git for things other than Mendix development.
You may get an Oops pop-up menu when setting a name and an email for Git in the Preferences dialog box or while committing. This problem might occur if there is no global Git config file on the PC yet. To fix this issue, you can use the Git command line client and do the following:
git config --global user.name "<Name>"git config --global user.email "<Email>"Any of these commands will create a global Git config. Subsequent interactions via the Studio Pro interface will succeed from now on.
When two branches are merged, changes sometimes do not come through. To fix this issue, take the following steps:
user.name and user.email exist in your git config:
git config --global user.name "<Name>"git config --global user.email "<Email>"git version.If you face connection problems when cloning the Git repository using the Open App or Download App dialog box, the first thing to check is whether the URL of the remote Git repository is correct. It should not be copied from the browser address bar. Most Git services have a noticeable colored Clone button which provides the correct URL in a pop-up window. You should use this URL with Studio Pro.
For the Studio Pro developers to be able to troubleshoot any issues that you face with beta Git support, Studio Pro provides a logging mechanism.
When filing a Git support issue with Mendix Support, attach the log files by doing the following:
Navigate to the Help menu > Open Log File Directory:
Copy the file called log.txt into your ticket. You can also attach additional log.X.txt files if they exist.
Several properties of the Git repository can provide you with information useful for troubleshooting different general and configuration issues. You can view them by executing the commands from the command line in the app's folder.
The following properties provide general information about the repository status and remotes.
git status -b - Provides information on the current state of the repository.git remote -v - Lists the remotes specified for the repository.Git stores configuration at several levels:
More specific configuration overrides more generic configuration (for example, local overrides global). You can inspect the configuration and see where each value is defined by using the following command:
git config --list --show-origin --show-scope
This command shows all active configuration values along with the file and scope they come from.
Sometimes it is impossible to create a package from a certain revision. See below for a description of the most common case and troubleshooting steps for resolving it.
When you commit (and push) changes to the repository, Studio Pro adds an additional commit with so called metadata to a special refspec .git/refs/notes/mx_metadata. Making it a refspec means that you will not see this commit in your commits history. This metadata contains the information needed to create a deployment package (for instance the version of Studio Pro that was used to create this revision).
To create a deployment package, Studio Pro downloads the specific revision into a temporary folder and then creates the package from there. Studio Pro checks the Mendix version of the selected revision to confirm that it is compatible with the version of Studio Pro.
Without the metadata, Studio Pro cannot find out this information.
You can force Studio Pro to recreate the metadata by doing the following:
This will recreate the metadata and you should now be able to create a deployment package from this new revision.
Studio Pro requires a specific minimum version of Git (for more information, see System Requirements). If this version is not installed on your device, Studio Pro will show a message during a start-up indicating that certain features will not be available.
You can download and install a recent version of Git from here.
Sometimes the Git process may crash while performing any operation on the repository. The reason for this can be a dead battery, a blue screen on Windows, or any other unexpected shutdown. As a result, there is a leftover index.lock file, which blocks other Git operations.
To fix this, go to <directory of your app>/.git/ and delete the index.lock file.
In case of a configuration error, an unknown author may appear in the commit history for one or more commits. The values used for commit messages originate from the Git configuration. This information is not used for authentication on Team Server and can be adjusted in Preferences.
Other tools on your machine that use the Git configuration, such as a traditional IDE, are typically also capable of changing this Git configuration. If you have chosen a name and email for a hobby project in another IDE, that information may also appear in commits made from Studio Pro.
To fix the issue, ensure that responsible users change their Git configuration in Preferences. Changing historical commits is not possible within Studio Pro.
This may be caused by the way the storage format of Git interacts with the way the Mendix model stores changes, which can accumulate substantial disk space over time. Studio Pro periodically optimizes your repository if automatic repository optimization is enabled.
You can run git gc in the command line to manually optimize the repository. git gc runs a number of housekeeping tasks, but primarily pack files are created. Pack files store just the changes to the files, which reduces the amount of data which needs to be stored.
Cloning or downloading your app consists of several steps. First the required data is downloaded from the server and then a local unpacking process is executed. The duration of the clone process depends on your repository size, internet connection and computer performance. In case cloning is taking a very long time, consider changing the clone type, or follow the steps described in Troubleshooting Repository Size.
When performing operations such as rebase, merge, cherry-pick, revert, or merging a feature branch, you may encounter an error stating that access to a certain path is denied, or see a a message like the following: Saving the conflicting mpr files failed, please abort and try again.
Studio Pro is unable to save changes to the project files due to file locks or conflicts.
To solve this issue, perform the following steps:
Explains consequences and root cause of a large repository size and how to mitigate this.
Presents a list of problems and fixes for Team Server issues.