by meagher · 5y ago · 0 comments
1. Bare git repo in your home directory ($HOME/.files)
2. Alias for prefixing git commands ("env GIT_WORK_TREE=$HOME GIT_DIR=$HOME/.files")
3. Strict .gitignore file (that ignores all files by default)
Simple to add files: `h git add .vimrc`
Have this set up for myself. Works great https://github.com/tmm/dotfiles
Basically adding a alias to my zshrc, that runs: `git --git-dir=$HOME/dotfiles --work-tree=$HOME`.
And then set status.showUntrackedFiles to no.
See: https://github.com/sp1ritCS/dotfiles
I've got this idea from the following blogpost: https://news.opensuse.org/2020/03/27/Manage-dotfiles-with-Gi...
I explain here the steps of how I do it: https://github.com/josepmdc/dotfiles#2-if-you-want-to-manage...