The .dvignore file is used by Diversion to specify files and directories that should be ignored when tracking changes. This helps keep the repository clean by excluding unnecessary or automatically generated files, such as build artifacts, temporary files, and cached data.

Purpose

Using a .dvignore file ensures that only relevant files are committed to the repository. This helps:

  • Prevent clutter from unnecessary files.
  • Improve performance by avoiding tracking large or frequently changing temporary files.
  • Avoid committing sensitive or auto-generated files.

File Structure

The .dvignore file consists of patterns defining which files or directories to exclude. It typically follows these rules:

  • A line starting with # serves as a comment. Put a backslash \ in front of the first hash for patterns that begin with a hash.
  • Don’t mix comments and patterns on the same line. Mixing them will cause the pattern to not have any effect.
  • Wildcards (*) match multiple characters.
  • Directories ending with / ignore all contents inside.
  • Negations (!) explicitly include files that might otherwise be ignored.

For game engine-specific projects, .dvignore ignores:

Unreal

# Unreal Engine build files

Build/*               

# Saved game states and config files

Saved/*               

# Compiled intermediate files

Intermediate/*        

# Editor cache files

DerivedDataCache/*    

Unity

# Unity Library

/[Ll]ibrary/          

# Temporary files

/[Tt]emp/             

# Object files

/[Oo]bj/              

# Build directories

/[Bb]uild/            

# User-specific settings

/[Uu]ser[Ss]ettings/  

Godot

# Godot internal directory

.godot/               

# Import cache folder

.import/              

# Export settings

export.cfg            

# Export presets

export_presets.cfg    

# Auto-generated translation files

*.translation         

You can modify the .dvignore file based on your project needs. If you work with additional tools or frameworks, consider adding their cache or temporary directories to improve repository management.

For example, if you use a custom build system, you might add:

/build_output/

/temp_build_files/

IMPORTANT NOTE: Files and directories that are already committed, will NOT be ignored by .dvignore.

  1. If you wish to ignore a committed path, you need to first delete it and commit the deletion. If the content of that path can’t be auto-generated, you should back it up somewhere else and copy back after committing the deletion.
  2. Notify your collaborators to backup their copies before committing the deletion, because updating with that commit will delete their copies too.
  3. Example of auto-generated paths: build artifacts and intermediates, auto-generated code.
  4. Example of non-auto-generated paths: credentials files, local configuration files.