My dotfiles
I'm using the bare git repository methodology here for managing files. You can find the OG Hacker News thread here.
TLDR; you split the git directory from the working directory.
Set up an alias in ~/.zshrc
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
Clone the repo with --bare
and then checkout the master
branch.
git clone --bare [email protected]:teamsnelgrove/dotfiles.git $HOME/.dotfiles
dotfiles checkout master
We don't wanna see all untracked files every time we do git status
.
dotfiles config --local status.showUntrackedFiles no
From here we use the alias as we normally would use git. Just need to be careful not to add untracked files by accident or forget to include them.