Sync Modes
Learn about the three sync modes — normal, secret, and ignore — and when to use each one.
Every tracked entry has a sync mode that controls how devsync handles it during push and pull. There are three modes: normal, secret, and ignore.
normal
Section titled “normal”The default mode. The file is copied to the repository exactly as-is, with no transformation applied.
devsync track ~/.gitconfigdevsync track ~/.zshrcdevsync track ~/.config/nvimGood for:
- Editor configs (
.vimrc,init.lua, VS Code settings) - Shell configs (
.zshrc,.bashrc,.bash_profile) - Git config (
.gitconfig) - Tool configs (
.tmux.conf,.wezterm.lua,starship.toml) - Any file that contains no sensitive information
The mirrored file in the repository has the same name as the original.
secret
Section titled “secret”The file is encrypted with age before being written to the repository. The stored artifact has a .devsync.secret extension.
devsync track ~/.ssh/config --mode secretdevsync track ~/.config/gh/hosts.yml --mode secretdevsync track ~/.aws/credentials --mode secretGood for:
- SSH config and keys
- API tokens and credentials
.envfiles with real secrets- Anything that should not appear in plaintext in your git history
During pull, devsync decrypts the artifact with your age private key before writing it to disk.
What it looks like in the repository
Section titled “What it looks like in the repository”A file tracked as ~/.ssh/config with --mode secret is stored as:
~/.config/devsync/sync/default/.ssh/config.devsync.secretignore
Section titled “ignore”The entry is registered in manifest.json but skipped entirely during push and pull. No file is read, written, or transferred.
devsync track ~/.config/some-tool/cache --mode ignoredevsync track ~/.local/share/generated-config --mode ignoreGood for:
- Machine-specific configs that should be tracked but not synced (e.g., hostname-dependent settings)
- Generated or cached files that you want to note but not replicate
- Entries you want to temporarily disable without removing from the manifest
Changing a Mode
Section titled “Changing a Mode”To change the mode of a tracked entry, run devsync track again with the new --mode flag. The existing entry is replaced:
# Originally tracked as normaldevsync track ~/.ssh/config
# Upgrade to secretdevsync track ~/.ssh/config --mode secretMode Summary
Section titled “Mode Summary”| Mode | Stored in repo | Encrypted | Synced on push/pull |
|---|---|---|---|
normal | Yes | No | Yes |
secret | Yes (.devsync.secret) | Yes (age) | Yes |
ignore | No | — | No |