This repo contains various config files. It follows the methodology describe by StreakyCobra over on Hacker News.
- Initialize a bare git repo with name
.dotfiles
git init --bare $HOME/.dotfiles- Add command alias to
.aliases
echo "alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> $HOME/.aliases && . ~/.zshrc- Make git only show tracked files (untracked files can still be viewed with
git status -u)
dotfiles config --local status.showUntrackedFiles no- Adding this repository as upstream
dotfiles remote add origin https://github.com/PossessedC0bra/.dotfiles.git- Creating main branch
git checkout mainBecause the dotfiles command is simply an alias to the git command with default values we can simplt use it in place of the git command.
dotfiles status
dotfiles add .zshrc
dotfiles commit -m "feat: add .zshrc"
dotfiles push- Cloning this repository
git clone --bare https://github.com/PossessedC0bra/.dotfiles.git $HOME/.dotfiles- Defining
dotfilesalias in current shell for convenience
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'- Checking out this repository
dotfiles checkout