Initialize the git repo in hidden files in your home folder
git init --bare ~/.dotfilesMake it so no files are tracked by default
dotfiles config status.showUntrackedFiles noAdd alias to your .bashrc or .zshrc:
alias dotfiles='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'On a new system clone this repo with:
git clone --bare [email protected]:abraham-jimmy/dotfiles.git $HOME/.dotfiles
alias dotfiles='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'
dotfiles checkout
dotfiles config --local status.showUntrackedFiles noThen you can use it to update and add files like:
dotfiles add <file>
dotfiles commit -m "Commit message"
dotfiles push origin main