Adding entire cache/ folder to .gitignore for development purposes

Hello there,

I’m currently integrating SuiteCRM for a company project, as I am the only developer here I still am an apprentice (web)application developer and keep practicing everyday !

I have installed SuiteCRM instances on 4 different servers (development, tests, staging, production) for now, all linked by Git.

I constantly add and try to customise the project to fit my company’s needs as much as possible and push the results on the 4 servers, step by step, looking for any fail or bug before pushing it on the production server.

I also think that some files generated in the cache/ folder seem not to be necessary for the other servers but I am not 100% sure about this, as I saw few forum posts telling to keep in track some files and folder in this folder.

I tried to find a proper .gitignore and felt on this one, added it to our projet — it seems to be well working by discarding all generated files by hand before pushing to my remote Git. Here is a part of this .gitignore :

# Ignore the cache folder

# Ignore some files and directories from the custom directory.

But there are still the changes that I was mentioning above tracked by Git, so here is my question :

Can I now add the entire cache/ folder to .gitignore so I won’t have to stash or discard changes at every stage of development ?

Version 7.11.20

My uncertainty mostly came after reading this article referred by this post and I don’t really know if it applies to every possible integration (like ours) or not or if the situation has changed.

As I am writing this topic, I realize that it is really close to the post I referred above.

Hi, welcome to the Community :tada:!

In that post I said…

Although I think all that is more relevant to the decision of when to delete the folder or not, and is probably less relevant (or irrelevant) to the gitignore decisions we’re discussing here.

I still don’t know if this is the case, but I advise you to try it. I don’t expect you to run into problems for not including the cache directory in source control.

1 Like

Hey, thank you for the welcoming !

Thank you again for your answer, I’ll certainly update this post after few tests.