Git Programmation Unity

Smartly git ignore assets from the store

# Add to .gitignore


# ... read more for full config

In a Unity project, we often use assets from the Asset Store or other sources which sometimes happen to be quite big. For example Oculus Integration uses almost 700 MB. There is no point adding this whole folder to git when you can download it from other source. This is especially important when your git repository has size limits, like with GitHub, Gitlab, Bitbucket, etc.

This post shows a way to ignore such a folder, but still track important files such as configuration or a readme file to track the current version and location to install/update.

Oculus Integration example

Let’s use Oculus Integration as an example. The package can be installed form the Asset Store for the latest version or from for any version. Both end up with the folder Assets/Oculus with a size of almost 700 MB


The following snipped can be added to the .gitignore file to:

  • Ignore the full Oculus folder
  • But don’t ignore it’s configuration
  • But don’t ignore a text file with download informations
# Ignore Oculus folder, but not important files

Download informations

To let other users know which version has to be installed, we can add a file, which name should not conflict with an existing file. The snipped above mention _IMPORT_VERSION.txt which can for example contain the following text:

Import Oculus Integration

To keep the git repository small, this folder is ignored but you need to import/update it manually from:

Version  44.0 


While this technique can massively reduce the size of your project’s repository, there is a drawback.

When you decide to update the component to a newer version, even if you take care to update the readme file, there is a risk that nobody else from your team will notice and they will stay with an old version. However this is easy to circumvent. Just communicate directly with them.