Issue
Sometimes the users want to add files into .gitignore to tell Git which files and directories to ignore when a commit is made.
For example, some users want to ignore the theme.compiled.css.map file that gets changed all the time. It could be ignored.
The background is that the files in theme-cache folder are in version control and Studio Pro instantly changes them. When this feature was built, it was made in such a way that committing generated and awaited the compilation of SCSS. The reason the files were committed was mainly to allow Design Mode to work. Since Studio Pro is capable of compiling the files when the project is opening. However, adding those to the ignore list may increase the time needed to open the project a bit.
Environment
Mendix with Git Team Server
Solution/Workaround
Follow the steps below to resolve this issue:
- Go to the project directory and edit .gitignore file
- Add the following line to ignore the theme.compiled.css.map file
# ignore theme.compiled.css.map in the theme-cache directory
/theme-cache/web/theme.compiled.css.map- If the ignored files are already tracked (already under the version control), untrack the files by running
git rm --cached filenamein the git command line. Example:
-
- Ignoring the theme.compiled.css.map file
# ignore the theme.compiled.css.map in the theme-cache directory
$ cd <project_folder>
$ git add .gitignore
$ git rm --cached theme-cache/web/theme.compiled.css.map- Commit and push the changes in the above steps by using Studio Pro:
Internal information related
- 206784, 192953
- CMAHHTG3V/p1644326065452869?thread_ts=1644314715.100969&cid=CMAHHTG3V, CJZ85RLTA/p1707397933084919
0 Comments