The .dvignore file
Safely ignore files not needed in your repository
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:
- Lines starting with
#
are comments. - 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
Unity
Godot
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:
IMPORTANT NOTE: Files and directories that are already committed, will NOT be ignored by .dvignore.
- 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.
- Notify your collaborators to backup their copies before committing the deletion, because updating with that commit will delete their copies too.
- Example of auto-generated paths: build artifacts and intermediates, auto-generated code.
- Example of non-auto-generated paths: credentials files, local configuration files.