Describe the issue or problem
There were OJS files in ftp in my case, other developer responsible for that and left the job. There was git repository but I did not understand the logic cause not all files were there. On one hand - maybe core files no need to be in repo. On the other hand - it is not clear which ones were modified. Plus I wanted to add more logging to core files so to know which I have modified, they are in git now.
I do not know if I will need to modify core files or add something extra to core files. We will try to not to do so but still might need. At least translations as I understand I need to have clearly in git. I really am not sure what is correct way, also could not find for this version.
I noticed that some files are dynamic and looks like should not be in git. But about others - it is not clear. I did not find even with AI where they are used. But maybe all files in public folder are created, edited by users from UI and should not be in git?
Steps I took leading up to the issue
Tried searching on what should be in git.
Also talked to AI but did not get asnwers which I would trust.
What application are you using?
OJS 3.5.0.3
Additional information
I see for example files like public/site/head-bg.png so it looks liek constant file, but who knows, when I did not find where it is even used.
I know you’re not undertaking an upgrade, but there is still content that may apply to your situation, and it gives a good overview of how to manage an OJS installation.
We also go into more detail on how to install / maintain OJS via Git in our documentation:
More to your question: files directory should sit outside of your install, so it is not really part of the Git repository like the OJS code files are.
Unless you’re confident you can maintain the code, and Git can be a good way of managing this, I would avoid of making any modifications to the core code. This is because it may break in future updates of OJS.
In the video it was told that in public dir there are images. In my case I see not only images, but there is folder named ‘styles’ which has css files.
So it is not fully clear still. In video it was told that on upgrading - make a backup of public folder.
It is not clear which files are user uploaded, which are set by devs and should be in git. I am just making guesses currently.
In those links I also did not find the answer.
Files directory is different one from public directory, so this is is clear. I am not putitng that into git, plus in my case it is huge.
Hi @dvtech, all of the files in the public folder are created and modified by users, and might include things like individual user profile images, a journal’s custom stylesheet, journal logos or favicon images that appear on the journal’s home page, journal issue cover images, or images associated with a journal’s announcements (if any). If this is a multi-journal installation, this is also where image or stylesheet files for the home page are stored (like public/site/head-bg.png). They are not files that are core to the OJS functionality, but if they are missing or lost it will impact how your journal appears to end users.
Personally I would not recommend adding these to your git repository, but as with the contents of the files directory and your database, ensure that you have regular backups in case of any problems.
(With that said, if you are responsible for the journal stylesheets, then I can see a case for putting those in git somewhere, even if just in a separate repository with all of the journal stylesheets you are managing.)