How DotState manages files and profiles
mainDotState uses a specific model to manage configurations across different environments:
- Storage: Your dotfiles are stored in a Git repository, typically located at
~/.config/dotstate/storage. - Symlinks: When you add a file to DotState, the original file is moved to the repository, and a symlink is created at the original location pointing to the file in the repo.
- Profiles: You can create separate profiles (e.g.,
work,personal,mac,linux) to manage different sets of configurations. - Inheritance: Profiles support inheritance. A child profile can extend a parent profile; child files will override parent files, allowing you to only define the differences.
- Common Files: Files shared across all profiles are stored in a
commonsection and are linked regardless of which profile is currently active. - Syncing: The
syncoperation automates the Git workflow (commit, pull, and push) to keep your remote repository up to date.