Personal dotfiles for cross-platform environment setup (WSL2 Ubuntu & macOS).
Managed with GNU Stow.
dotfiles/
├── install.sh # Stow wrapper script
├── shell/ # Shell configurations (stow package)
│ ├── .bashrc # Bash configuration
│ ├── .zshrc # Zsh configuration
│ └── .aliases # Shell aliases
├── git/ # Git configurations (stow package)
│ ├── .gitconfig # Git config
│ └── gitconfig.local # Machine-specific git settings (not stowed)
└── tmux/ # Tmux configurations (stow package)
└── .tmux.conf # Tmux config
Each subdirectory is a Stow "package". Files inside mirror the structure
of $HOME -- running stow shell creates ~/.bashrc, ~/.zshrc, and
~/.aliases as symlinks back into this repo.
- GNU Stow
# Ubuntu/Debian sudo apt install stow # macOS brew install stow
-
Clone this repository:
git clone <repository-url> ~/git/dotfiles cd ~/git/dotfiles
-
Run the installation script (stows all packages):
./install.sh
Or stow packages individually:
stow --target="$HOME" shell stow --target="$HOME" git stow --target="$HOME" tmux
-
Restart your shell or source your configuration:
source ~/.bashrc # or ~/.zshrc
Remove symlinks for all packages:
stow -D --target="$HOME" shell git tmux- Conflict detection: Stow will refuse to overwrite existing files that are not symlinks it manages. Back up or remove conflicting files first.
- Idempotent: Safe to run multiple times.
- Non-destructive: Only creates symlinks, never deletes your files.
-
Edit files directly in the repository -- changes take effect immediately since they are symlinked:
cd ~/git/dotfiles vim shell/.bashrc
-
Commit your changes:
git add . git commit -m "Update bashrc" git push
-
On other machines, pull and re-stow:
cd ~/git/dotfiles git pull ./install.sh
-
Place the file in the appropriate package directory with the target name (including the leading dot):
# Example: add a new .vimrc managed by a "vim" package mkdir -p vim cp ~/.vimrc vim/.vimrc
-
Stow the package:
stow --target="$HOME" vimOr add it to the
PACKAGESarray ininstall.shfor automatic stowing.
- WSL2 Ubuntu
- macOS
- Linux
Sensitive files are intentionally excluded:
.ssh/- SSH keys.aws/- AWS credentials.env- Environment variables with secrets- History files