Prevent committing theme-cache/* getting committed

3
Hi all, upon commtting changes in MendixStudioPro, two big files theme.compiled.css and theme.compiled.css.map of 3,9 and 5 MB respectively cause a popup, asking id I am sure that I want these two files included in the commit. I don't want them, since they are caching-files, of which it is useless to add them to any version-management tool. Is there a way to prevent this popup and not remoove these two files from version management?   I tried to add /theme-cache/* to gitignore: /theme-cache/ , but still the popup kept appearing. Mendix support gave me these commandline commands: C:\Users\tsteenbe\MendixApps\NicoPortaal-main\theme-cache\web>git rm --cached theme.compiled.css.map rm 'theme-cache/web/theme.compiled.css.map' C:\Users\tsteenbe\MendixApps\NicoPortaal-main\theme-cache\web>git rm --cached theme.compiled.css rm 'theme-cache/web/theme.compiled.css' C:\Users\tsteenbe\MendixApps\NicoPortaal-main\theme-cache\web>git commit -am "Remove ignored files" On branch mainYour branch is ahead of 'origin/main' by 3 commits. (use "git push" to publish your local commits) Untracked files: (use "git add <file>..." to include in what will be committed) ../ ../../userlib/commons-codec-1.15.jar.DocumentParser.RequiredLib ../../userlib/commons-logging-1.2.jar.DocumentParser.RequiredLib nothing added to commit but untracked files present (use "git add" to track) and then commit in StudioPro. Still the popup kept appearing.   Workaround is removing those two files before comitting, which is also a nuissance.   Any ideas how to prevent the popup arrising?
asked
3 answers
1

This is what worked for me:

 

  • In my `.gitignore` file I added the line `/theme-cache/*`
  • In my terminal I ran `git rm -r --cached ./theme-cache/`

 

Additional Notes:

  • I am using Mendix 10.7
  • `git status` can help show what the current changes are
answered
0

Same question here, very annoying to always have an irrelevant theme-cache in the commits.

answered
0

Adding such folders to the .gitignore file is the correct approach. This should have worked for you. Didnt it work for your case? did you find any issue in doing so?

answered