I store my dotfiles in this repo. It is public so I could access it on new machines but feel free to explore or make a similar setup with my commands. I only added the lazygit alias over the Arch wiki guide. Run the reset --mixed HEAD in case I need to override existing settings.
Setup a dotfile bare repo
git init --bare ~/.dotfiles
alias dotfiles='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'
alias dotfiles-lazygit='lazygit --work-tree=$HOME --git-dir=$HOME/.dotfiles'
dotfiles config status.showUntrackedFiles noYour dotfiles can be replicated on a new system like:
git clone --bare <git-repo-url> $HOME/.dotfiles
alias dotfiles='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'
alias dotfiles-lazygit='lazygit --work-tree=$HOME --git-dir=$HOME/.dotfiles'
dotfiles config --local status.showUntrackedFiles no
dotfiles reset --mixed HEAD
dotfiles checkoutThese are the folders I am racking. A bare repo can't check for new files, only for updates. So running this command will check for me.
dotfiles add ~/.config/hypr/
dotfiles add ~/.config/nvim/
dotfiles add ~/.config/fontconfig/
dotfiles add ~/.config/kanata/
dotfiles add ~/.config/cspell/
dotfiles add ~/.config/ghostty/