Exclusion Logic

Beyond the standard matching rules, forg implements a sophisticated multi-layered exclusion system to protect sensitive data.

The Secondary Configuration Layer: .ignore.json

Located at ~/.forg/.ignore.json, this file defines a set of "Hard Exclusions." These are regex patterns for files that must never be touched during any organization operation.

Technical Implementation

Hidden File Guard

The "Hidden File Guard" is the first line of defense.

Critical Safety
While --allow-hidden can be used to organize configuration files, the .ignore.json layer remains active. This allows you to safely process hidden files while still protecting critical system files like .ssh/config or .bashrc by explicitly listing them in the ignore file.

On this page
The Secondary Configuration Layer: .ignore.json Technical Implementation Hidden File Guard