As advised by Christof Marti at microsoft/vscode-remote-release#8436 (comment) VSCode has support for cloning a repo of dotfiles.
And, related docs > https://code.visualstudio.com/docs/devcontainers/containers#_personalizing-with-dotfile-repositories
The .zshrc automatically sources ~/.zshrc.secrets if it exists. This allows you to keep sensitive credentials (API keys, tokens, etc.) out of version control.
-
Copy the example template:
cp .zshrc.secrets.example ~/.zshrc.secrets -
Make it secure:
chmod 600 ~/.zshrc.secrets -
Edit
~/.zshrc.secretsand add your actual credentials
Important: Never commit .zshrc.secrets - only the .zshrc.secrets.example template should be in git.
.gitconfig automatically includes ~/.gitconfig.local if it exists. Use this for anything that should differ per machine — a different email on a work vs. personal laptop, a signing key, a proxy — without forking .gitconfig itself.
-
Copy the example template:
cp .gitconfig.local.example ~/.gitconfig.local -
Edit
~/.gitconfig.localand uncomment/fill in whatever overrides you need.
Important: Never commit .gitconfig.local - only the .gitconfig.local.example template should be in git.
The .zshrc includes automatic corruption detection and repair for history files in devcontainers.
If you see a corrupted history file error:
# Option 1: Auto-fix (built into .zshrc, runs on next shell restart)
exec zsh
# Option 2: Manual fix
fix-history
# Option 3: Start fresh
echo "# Fresh history $(date)" > ~/.zsh_historyFor detailed information about history management, see HISTORY_SETUP.md.