How do I treat compiled files in an episerver project?

  • Page Owner: Not Set
  • Last Reviewed: 2019-11-07

What should the file look like in git or the csproj if it is compiled.


Additional Posts

CSS and compiled JS files should not be marked as content in the .csproj file. In git, the file should be marked as "assume unchanged". Using (git)bash the following command will mark css files as assume unchanged

 find . -type f -iname *.css -exec git update-index --assume-unchanged {} \;

If you accidentally assume unchanged a file that should not be:

To get undo/show dir's/files that are set to assume-unchanged run this:

git update-index --no-assume-unchanged <file>

To get a list of dir's/files that are assume-unchanged run this:

git ls-files -v|grep '^h'

Comments

  • Also, if you receive the error fatal: Unable to mark file -- make sure the file is not included in your git ignore file.