What cockpit files can be ignored when pushing to Repo?

There are a lot of files with Cockpit which bog down git repos. Just wondering what are the core files that need to be pushed to a repo that stores all the data and assets and what can be ignored.

Except I’m wondering now. it seems the collections and structure of the collections themselves are not stored in the storage folder.

Where are these stored?

What do you upload to the production server if that has changed locally?

They should be stored in storage/collections/*.php, but the .gitignore file prevents everything inside storage/ from version control.

Here is a small overview of the data structure (with SQLite) - you can ignore cockpit.memory.sqlite:

If you want to have version control for all your data, I would suggest to define a custom COCKPIT_ENV_ROOT with all of your data in a separate folder.

Create a folder path/to/cockpit/data.
Create a file path/to/cockpit/defines.php:

define('COCKPIT_ENV_ROOT', __DIR__ .'/data');

Now cockpit looks for config/, addons/ and storage inside your data folder. Make sure to copy/create the folder structure from the core and to remove all unused .gitignore files inside it. Now you can version control this data folder.

A more advanced option is to use my cockpit-lib-skeleton for more granular control about your file structure: