My personal dotfiles managed as a bare Git repository.
- Bare Git Repository: Clean home directory without nested
.gitfolders - Fish Shell: Modern shell with custom aliases and utilities
- Ghostty: GPU-accelerated terminal emulator
- Aerospace: Tiling window manager for macOS
- Neovim: Custom configuration as a Git submodule
- OpenCode: AI coding assistant configuration
- Security-First:
.gitignoreexcludes sensitive directories (ssh, tokens, credentials)
~/.gitignore # Global ignore rules
~/.gitconfig # Shared Git configuration
~/.gitconfig.local.example # Template for machine-specific settings
~/.config/fish/ # Fish shell configuration
├── config.fish # Main configuration
├── alias.fish # Command aliases
├── utils.fish # Utility functions
└── dotfiles.fish # Dotfiles management abbreviations
~/.config/ghostty/config # Terminal emulator settings
~/.config/aerospace/aerospace.toml # Window manager configuration
~/.config/opencode/ # OpenCode AI assistant
├── AGENTS.md # Agent instructions
├── .opencode.json # Configuration
└── themes/ # Custom themes
~/.config/nvim/ # Neovim (submodule)
- Git
- Fish shell (
brew install fish) - Ghostty (
brew install --cask ghostty) - Aerospace (
brew install --cask nikitabobko/tap/aerospace) - Neovim (
brew install neovim)
-
Clone the dotfiles repository as a bare repo:
git clone --bare https://github.com/YajanaRao/dots.git $HOME/.dots -
Define a temporary alias:
alias dots='git --git-dir=$HOME/.dots/ --work-tree=$HOME'
-
Checkout the dotfiles:
dots checkout main
If you get errors about existing files, backup or remove them:
mkdir -p ~/.dotfiles-backup dots checkout 2>&1 | grep -E "\s+\." | awk '{print $1}' | xargs -I{} mv {} ~/.dotfiles-backup/{} dots checkout main
-
Configure the repository to not show untracked files:
dots config --local status.showUntrackedFiles no
-
Initialize the Neovim submodule:
dots submodule update --init --recursive
-
Set up machine-specific Git configuration:
cp ~/.gitconfig.local.example ~/.gitconfig.local
Edit
~/.gitconfig.localand add your email:[user] email = your.email@example.com
-
Set up OpenCode configuration (optional):
cp ~/.config/opencode/.opencode.json.example ~/.config/opencode/.opencode.json
Edit
~/.config/opencode/.opencode.jsonand add your API keys for the providers you use. -
Set Fish as your default shell:
echo /opt/homebrew/bin/fish | sudo tee -a /etc/shells chsh -s /opt/homebrew/bin/fish
-
Reload Fish configuration:
source ~/.config/fish/config.fish
Alternatively, use the automated install script:
curl -fsSL https://raw.githubusercontent.com/YajanaRao/dots/main/install.sh | bashAfter installation, Fish shell will have these abbreviations available:
dots- Main dotfiles command (equivalent togit --git-dir=$HOME/.dots/ --work-tree=$HOME)dotss- Check dotfiles statusdotsa- Add files to dotfilesdotsc- Commit dotfiles changesdotsp- Push dotfiles to remotedotspl- Pull dotfiles from remotedotsd- Show dotfiles diffdotsl- Show dotfiles log
- Make changes to your config files
- Check what changed:
dotss
- Add files you want to track:
dotsa ~/.config/some-app/config.yml
- Commit your changes:
dotsc "Add some-app configuration" - Push to GitHub:
dotsp
dotspl # Pull latest changes
dots submodule update --recursive # Update submodules if neededThe following directories and files are never tracked:
~/.ssh/- SSH keys~/.config/gh/- GitHub CLI credentials~/.config/github-copilot/- GitHub Copilot tokens~/.gnupg/- GPG keys~/.config/configstore/- Various API tokens~/.config/opencode/.opencode.json- OpenCode API keysnode_modules/- Dependencies
Machine-specific secrets:
- Your email is stored in
~/.gitconfig.local(not tracked) - API keys are stored in
~/.config/opencode/.opencode.json(not tracked)
Neovim is managed as a separate Git submodule from YajanaRao/nvim.
To update Neovim configuration:
cd ~/.config/nvim
git pull origin main
cd ~
dotsa ~/.config/nvim
dotsc "Update nvim submodule"
dotspReload the Fish configuration:
source ~/.config/fish/config.fishInitialize and update submodules:
dots submodule update --init --recursiveMake sure untracked files are hidden:
dots config --local status.showUntrackedFiles noMIT