Unable to restore commit notes - The filename or extension is too long in Mendix Studio Pro

0
Hi Community,I am encountering an issue in Mendix Studio Pro when opening my project.Error message:"Unable to restore commit notes. An error occurred trying to start process 'C:\Program Files\Git\cmd\git.exe' with working directory 'C:\Users\1YPOLAWAR\Mendix\SmartDemoSystem-main'. The filename or extension is too long."Environment:- Mendix Studio Pro- Windows 11- Git installed locally- Project is under Git version controlThe project opens, but Studio Pro shows this error while attempting to restore commit notes.I suspect the issue may be related to Windows path length limitations or the repository structure, but I am not sure of the root cause.Has anyone experienced this issue before?- What causes Mendix to throw this error when interacting with Git?- Are there any recommended fixes besides moving the project to a shorter directory path?- Does enabling Git long-path support resolve the issue permanently?Any guidance or best practices would be appreciated.Thank you.
asked
2 answers
0

Hi Yogeshwar,

This issue could be related to Windows MAX_PATH limitations when Git interacts with the project repository.

Even though your project is located in a relatively short directory (C:\Users\1YPOLAWAR\Mendix\SmartDemoSystem-main), some files inside the repository may have deeply nested directory structures that exceed the traditional Windows path-length limit of 260 characters.

I would suggest trying the following steps before moving the project to another location.

1. Enable Git long-path support

Open Git Bash or Command Prompt and execute:

git config --global core.longpaths true

This enables long-path support for Git for Windows operations that support it.

You can verify the setting using:

git config --global --get core.longpaths

It should return true.

2. Enable Windows long-path support

Windows 11 also provides support for longer file paths, but it needs to be enabled.

Open PowerShell as Administrator and execute:

New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force

Restart your computer after making this change.

Note that this Windows setting only benefits applications that are designed to support long paths. It does not automatically remove the limitation from every application.

3. Check your Git installation

Make sure Studio Pro is using a compatible Git installation.

Run:

git --version

Also verify that Git works correctly from the project directory by executing:

git status

If Git commands work independently but Studio Pro still throws the error, the issue might be related to how Studio Pro invokes Git rather than Git itself.

4. Check for deeply nested files

You can inspect the repository for unusually long file paths. Sometimes imported modules, dependencies, or nested directories can cause this issue.

Enabling core.longpaths may resolve Git-level path issues, but it does not guarantee that every operation performed by Studio Pro or other Windows applications will support long paths.

5. Try reopening the project

After applying the configuration changes:

  • Close Studio Pro.

  • Restart Windows.

  • Reopen the project.

  • Check whether the commit notes are restored successfully.

My suggestion:

I would first try enabling core.longpaths and Windows long-path support before making any changes to the repository.

One interesting point in your error message is that it specifically mentions "Unable to restore commit notes." Mendix uses Git metadata stored in a special notes reference (.git/refs/notes/mx_metadata). So it would be worth checking whether the issue occurs only while restoring commit notes or also during normal Git operations such as commit, push, and pull.

Hope this helps!

answered
0

Hi Yogeshwar,

The important detail in your error is that Studio Pro fails while trying to start git.exe, not necessarily while Git is processing a long repository filename.

Unable to restore commit notes.
An error occurred trying to start process
'C:\Program Files\Git\cmd\git.exe'
with working directory
'C:\Users\...\SmartDemoSystem-main'.
The filename or extension is too long.

I recommend the following steps to isolate and resolve the issue.

1. Verify that Git can start independently

Close Studio Pro, open PowerShell, and execute:

& "C:\Program Files\Git\cmd\git.exe" --version

Then navigate to your Mendix project directory and execute:

git status
git notes --ref=mx_metadata list

If Git starts successfully, the executable itself is accessible. If these commands fail, investigate the Git installation and the specific error returned.

2. Move the project to a shorter path

As a diagnostic test, back up the project and move a copy to a short directory such as:

C:\MxApps\SmartDemoSystem

Open the copied project using the same Studio Pro version.

If this resolves the issue, the original directory structure or path length was contributing to the failure.

3. Check Git long-path support

If Git reports errors involving long repository filenames, enable Git long-path support:

git config --global core.longpaths true

You can also check whether Windows long-path support is enabled.

However, core.longpaths affects Git's handling of long file paths. It does not necessarily fix an error that occurs before git.exe starts.

4. Check Windows environment variables

If Git works from PowerShell but Studio Pro still cannot launch it, inspect the Windows user and system environment variables, particularly PATH.

An excessively long or malformed environment variable can cause Windows process creation to fail.

Compare the environment with a working machine, if available. Correct any invalid or unnecessarily duplicated entries, then restart Studio Pro.

5. Check Studio Pro logs

Open:

Help → Open Log File Directory

Inspect log.txt for the complete exception and any inner exception associated with the failed Git process.

If the issue persists, share the logs with Mendix Support.

My recommendation:

Start with the direct git.exe --version test, followed by opening a backed-up copy of the project from a short directory.

If Git works independently and shortening the path does not help, investigate the process-launch environment rather than repeatedly changing Git long-path settings.

Also, avoid manually modifying .git/refs/notes/mx_metadata or the Mendix model files. The commit metadata is managed by Studio Pro.

Official Mendix references:

Hope this helps! If you find this answer helpful, please mark it as the accepted answer.

answered