dotfiles/.dotfiles
2022-04-24 14:38:24 +02:00
..
arch_install.md docs: Update arch_install.md 2022-04-21 10:35:54 +02:00
pkglist.txt sway: Set cursor theme to breeze_snow 2022-04-24 14:38:24 +02:00
README.md readme: Fix alias definition 2022-04-14 17:50:29 +02:00

My Dotfiles using a bare git repository

Setup repository and worktree

git init --bare $HOME/.dotfiles
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
# ideally place the alias into your shells alias file
dotfiles config --local status.showUntrackedFiles no
dotfile add [...]
dotfiles commit [...]
# Setup remote git repository
dotfiles push

Install / restore dotfiles

echo ".dotfiles" >> .gitignore
git clone --bare <remote-git-repo-url> $HOME/.dotfiles
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
dotfiles config --local status.showUntrackedFiles no
dotfiles checkout

References

Atlassian dotfiles git Guide The best way to store your dotfiles