This repo is for tracking and storing my dotfiles across multiple devices.
.
├── .tmux.conf
├── .zshrc
└── .config/
├── alacritty/
├── fish/
├── helix/
├── karabiner/
└── nvim/
mkdir ~/.dotfiles
git init --bare $HOME/.dotfiles
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
dotfiles config --local status.showUntrackedFiles no
- create a github repo for storing dotfiles
git remote add origin <github repo>
git branch -M main
git push -u origin main
- add and commit files to repo
dotfiles status
dotfiles add .zshrc
dotfiles commit -m "add .zshrc"
dotfiles push
Git bare repo
is not suppose to store anything, but if there is a need to
# add file or folder to repo
alias dotfilesa='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME add'
# remove file or folder from repo
alias dotfilesr='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME rm -r --cached'
- clone to secondary device
git clone --bare <github repo> $HOME/.dotfiles
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
dotfiles checkout
- install brew packages to new device
brew install $(brew-packages.txt)
brew install --cask $(brew-cask-packages.txt)