Easily manage and sync your personal configuration files across machines using this dotfiles repository.
This repository currently includes:
Most user-facing configuration files live under the home/ directory and are
intended to be installed into your real $HOME as symlinks. For example the
repo file home/.zshrc should be linked to ~/.zshrc on your machine.
Common files included (examples — check git ls-files for the authoritative list):
home/bin/genmsg— Smart commit message generator for dotfiles (used by df-diff, dotpush)home/funcs/klogs.sh— Kubernetes pod log and container info shell functionshome/.aliases— Shell aliases and helper functions (sourced by .zshrc/.bash_profile)home/.zshrc— Zsh shell configuration (with plugins, aliases, etc.)home/.zprofile— Zsh profile script (login-time environment variables)home/.bash_profile— Bash profile script (for Bash compatibility)home/.npmrc— npm configurationhome/.yarnrc— Yarn configurationhome/.gitconfig— Git configuration (user info, aliases, etc.).gitignore— Repo-level ignore (not installed into $HOME)Brewfile— Homebrew/cask/tap/extensions list for easy setup (generated withbrew bundle dump)
Note: some repo-owned helper files (like README.md, scripts, and the Brewfile)
stay at the repo root and are not intended to be symlinked into your home.
dotfiles/
├── home/
│ ├── .aliases
│ ├── .gitconfig
│ ├── .zshrc
│ ├── .zprofile
│ ├── .bash_profile
│ ├── .npmrc
│ ├── .yarnrc
│ └── .gitconfig
├── scripts/
│ └── check_dotfiles_symlinks.sh
├── bin/
│ └── genmsg
├── funcs/
│ └── klogs.sh
├── Brewfile
└── README.md
Clone this repo and use the included helper to install the home/ files into
your $HOME safely.
git clone https://gitlab.com/<yourusername>/dotfiles.git ~/dotfiles
# preview changes (dry-run)
bash ~/dotfiles/scripts/check_dotfiles_symlinks.sh --dry-run
# apply: creates timestamped backups of existing files and replaces them with
# symlinks pointing at files under ~/dotfiles/home
bash ~/dotfiles/scripts/check_dotfiles_symlinks.sh --applySome helper scripts and aliases in this repo expect the DF_DIR environment variable to point to the root of your cloned dotfiles repository. Set it to wherever you cloned the repo, for example:
export DF_DIR="$HOME/dotfiles"This variable is referenced by home/.aliases, home/.zshrc, and helper
commands like dotpush and brewupdate so they can operate regardless of
your current working directory.
If you prefer to manage a single file manually, point the symlink at the
corresponding path under home/, for example:
ln -sf ~/dotfiles/home/.zshrc ~/.zshrcTip: run the --dry-run first to confirm what will change.
- These dotfiles are tailored for macOS, but most settings are portable to Linux.
- Some paths (e.g., Homebrew, nvm, VS Code integration) are macOS-specific. Adjust as needed for Linux.
- Existing config files: If you already have dot files, back them up before symlinking.
- Symlink issues: Use
ls -l ~/.<filename>to verify the symlink points to the right file. - Permissions: Ensure you have the correct permissions for your home directory and dotfiles.
- Fork or clone and add your own dotfiles.
- PRs and suggestions are welcome!
This repository includes a Brewfile that lists all Homebrew packages, casks (macOS apps), and VS Code extensions used in this setup.
You can use this file to quickly set up a new machine or restore your environment.
brew bundle dump --file=~/dotfiles/Brewfile --forcebrew bundle --file=~/dotfiles/BrewfileThis will:
- Install all Homebrew packages (
brew) - Install all casks (
cask) - Add all taps (
tap) - Install all listed VS Code extensions (
vscode)
Note:
- Make sure you have Homebrew installed: https://brew.sh
- For VS Code extensions, you need the
codecommand available in your PATH.
To update Homebrew itself (the package manager and its formulae/casks list):
brew updateTo upgrade all installed packages and casks to their latest versions:
brew upgradeYou can also upgrade a specific package or cask:
brew upgrade <formula-or-cask>Run these regularly to keep your system and Brewfile dependencies current.
For more details, see the Homebrew Bundle documentation.