# What cockpit files can be ignored when pushing to Repo?

**URL:** <https://discourse.getcockpit.com/t/what-cockpit-files-can-be-ignored-when-pushing-to-repo/1662>\
**Category:** Support\
**Created:** [October 3, 2020, 3:42am UTC](https://discourse.getcockpit.com/t/what-cockpit-files-can-be-ignored-when-pushing-to-repo/1662 "2020-10-03T03:42:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oboogy](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/oboogy/32/680_2.png) [@oboogy](https://discourse.getcockpit.com/u/oboogy)\
**Post date:** [October 3, 2020, 3:42am UTC](https://discourse.getcockpit.com/t/what-cockpit-files-can-be-ignored-when-pushing-to-repo/1662/1 "2020-10-03T03:42:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![oboogy](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/oboogy/32/680_2.png) [@oboogy](https://discourse.getcockpit.com/u/oboogy)\
**Post date:** [October 3, 2020, 3:48pm UTC](https://discourse.getcockpit.com/t/what-cockpit-files-can-be-ignored-when-pushing-to-repo/1662/3 "2020-10-03T15:48:27Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [October 4, 2020, 10:18am UTC](https://discourse.getcockpit.com/t/what-cockpit-files-can-be-ignored-when-pushing-to-repo/1662/4 "2020-10-04T10:18:20Z")

</div>

> [@oboogy](#):
>
> it seems the collections and structure of the collections themselves are not stored in the storage folder.

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`:

> [@Possible to add default data-scheme to Docker image?](https://discourse.getcockpit.com/t/possible-to-add-default-data-scheme-to-docker-image/1535/5):
>
> Yes. Only the data is stored in databases (MongoDB or SQLite). All the definition files are stored in /storage/collections/\*.collection.php /storage/singleton/\*.singleton.php /storage/forms/\*.form.php Data are things like users, some addon config, dashboard settings… - /storage/data/cockpit.sqlite collection entries - /storage/data/collections.sqlite singleton data - /storage/data/cockpitdb.sqlite form submissions - /storage/data/forms.sqlite locked entries (multi user setup) - /storage/da…

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`:

```php
<?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:

> **[GitHub - raffaelj/cockpit-lib-skeleton: A skeleton to use Cockpit CMS as a...](https://github.com/raffaelj/cockpit-lib-skeleton)**
>
> A skeleton to use Cockpit CMS as a library with all core admin ui features - GitHub - raffaelj/cockpit-lib-skeleton: A skeleton to use Cockpit CMS as a library with all core admin ui features
