Not sure how to achieve that for now, but we need to exclude the following files from git command output koha-tmpl/intranet-tmpl/prog/js/vue/dist/main.js koha-tmpl/intranet-tmpl/prog/css/staff-global.css koha-tmpl/opac-tmpl/bootstrap/css/*.css git diff, git status, etc. We don't want developers to think about them every time they are inspecting git index. Kind of related with https://gitlab.com/koha-community/koha-misc4dev/-/issues/60
We could use `git update-index --assume-unchanged ` But when? from where?
You can use this technique: https://git-scm.com/docs/gitattributes#_marking_files_as_binary Files are still shown by git diff but not their contents
(In reply to Julian Maurice from comment #2) > You can use this technique: > https://git-scm.com/docs/gitattributes#_marking_files_as_binary > > Files are still shown by git diff but not their contents I really would like them to be invisible to devs. Not there for stash, status, diff, etc.
(In reply to Jonathan Druart from comment #3) > I really would like them to be invisible to devs. Not there for stash, > status, diff, etc. Maybe we should really exclude them from git then ? It's a good practice to avoid tracking compiled files in git. In addition to the problems you already mentioned, they increase the repository size. But that would make the build step required in production environments that use git, which might be not wanted. Another potential solution would be to move them to another git repository (like what was suggested for PO files) and use it as an optional git submodule ? On a dev environment you wouldn't need it, and in prod environments you could just grab the already compiled files. Anyway, all of that might be too complicated just to hide a few files from git output :) I never used `update-index --assume-unchanged` so I don't know what it implies, but it looks like it will generate confusing errors for those that don't know what the 'assume unchanged' flag is, and how to unset it
My feeling is that they shouldn't be in git at all, as Julian suggests. The should get built at the packaging state for production, ktd already builds as required at start (and we've got work underway to set watchers should you want that option). I'm not sure the dev install type should be a deciding factor.. it's not a recommended way to install in production so I think it's OK for it to be a somewhat second class citizen.. we just need to document the build step into any dev install instructions that still exist.
(In reply to Martin Renvoize from comment #5) > My feeling is that they shouldn't be in git at all, as Julian suggests. > > The should get built at the packaging state for production, ktd already > builds as required at start (and we've got work underway to set watchers > should you want that option). > > I'm not sure the dev install type should be a deciding factor.. it's not a > recommended way to install in production so I think it's OK for it to be a > somewhat second class citizen.. we just need to document the build step into > any dev install instructions that still exist. +1
Well, yes, ok, we all agree they should not be versioned, but that was not the point of this bug report. Here I wanted a quick solution to stop them bothering devs (they are always showing as modified in git commands). What we really want, the long term solution, is to remove all compiled files (so main.js for the vue app, and the css files generated by yarn build) from the git repo. But it's not as easy as... what I thought would be easy to implement here. So basically if it's not easy to have the quick solution, maybe better to spend time on the long term version...
Replaced by bug 32609.