Each Code Ocean capsule contains a Git repository, which is subject to maximum file and repository size limits. The total size of the repository must be less than 1 GB and no individual file can be larger than 100 MB.
Your larger files, which tend to be the data, can be placed under the data
folder, which is automatically added to .gitignore. This has the effect of hiding these files from Git, thereby bypassing any size limits. (Alternatively, you can also manually create a .gitignore
file, and specify particular folders that should be hidden from Git.)
These limits will also apply when you import an existing repository into Code Ocean. If you run into a size limit error when trying to import a repository, please get in touch and we will be happy to help.
Why are there these limits?
As Linus Torvald puts it, "Git fundamentally never really looks at less than the whole repo. Even if you limit things a bit (ie check out just a portion, or have the history go back just a bit), git ends up still always caring about the whole thing, and carrying the knowledge around.
So git scales really badly if you force it to look at everything as one huge repository."