[This] way (linked from the tutorials section of the page) is a great way to version your dotfiles without symlinks or installer scripts. [This]: https://www.atlassian.com/git/tutorials/dotfiles
What issue do symlinks have that makes them worth listing as a negative? Asking as someone who wrote an installer script to make symlinks a decade ago, and has used it whenever setting up a new computer ever since.
Unofficial guide to dotfiles on GitHub
51–60 of 65 posts
Re: Unofficial guide to dotfiles on GitHub
#52Just wanted to mention Stow[1] here, which I use to symlink my dotfiles on a new machine on a per app basis for many years now. My set up script just installs basic compiler toolchain and runs a bunch of stow commands based on Linux/Mac OS. I also adhere to XDG base spec[2] so I can keep my ~/ clean. 1: https://www.gnu.org/software/stow/ 2: https://wiki.archlinux.org/title/XDG_Base_Directory
Re: Unofficial guide to dotfiles on GitHub
#53Glad they've come a long way since then.
Re: Unofficial guide to dotfiles on GitHub
#54There are so many utilities. Why not just use ansible? It can manage your dotfiles and much more (you can configure your whole machine).
Re: Unofficial guide to dotfiles on GitHub
#55There are so many utilities. Why not just use ansible? It can manage your dotfiles and much more (you can configure your whole machine).
The big benefit is that it can be organized in a modular way with roles and tags, and sensitives files (like my gpg keys...) can be encrypted with the vault.
Re: Unofficial guide to dotfiles on GitHub
#56It took me 20 years to have an important realization about version controlled dotfiles: what I wanted to do was manage a set of sensible, personalized, non-standard behaviours for each tool I used, and have a way of distributing those across systems. What I didn’t need at all, after all, was anything that installed different things on different hosts or classes of hosts. Luckily, every tool I want to configure has a…
# .dotfiles/.bashrc
# shared baseline config...
if [ -f ~/.bashrc.local ]; then
. ~/.bashrc.local
fiRe: Unofficial guide to dotfiles on GitHub
#57Just wanted to mention Stow[1] here, which I use to symlink my dotfiles on a new machine on a per app basis for many years now. My set up script just installs basic compiler toolchain and runs a bunch of stow commands based on Linux/Mac OS. I also adhere to XDG base spec[2] so I can keep my ~/ clean. 1: https://www.gnu.org/software/stow/ 2: https://wiki.archlinux.org/title/XDG_Base_Directory
One thing, I didn't split things by apps per se. I split them based on task. In some machines, I do Python work, so I created a 'python' package. In some I do PHP, so I created a 'php' one. I have a 'base' one where it has my .bashrc, .profile, .bash_profile, fish configs and other things.
Everything in the .bashrc. .profile, etc is loaded around conditionals. So, while the files are long, the section only activates if the other package is available. I thought about splitting it onto files, but most editors have a way of collapsing sections, so I decided to keep it on one so it's easy to edit in one place.
Re: Unofficial guide to dotfiles on GitHub
#58Literally was just looking at doing this an hour ago. After deciding it’d be too much work I come to hn for my pre-sleep reading and find this, lol.
Re: Unofficial guide to dotfiles on GitHub
#59In the home directory (~) run:
git init
git remote add origin https://github.com/username/dotfiles
echo '/**' >> .gitignore;
git add -f .gitignore
git add -f .gitconfig
git add -f .bash_profile
# etc and push
On the second machine: git clone https://github.com/username/dotfiles tmp --no-checkout
mv tmp/.git .
rmdir tmp
git reset --mixedRe: Unofficial guide to dotfiles on GitHub
#60It took me 20 years to have an important realization about version controlled dotfiles: what I wanted to do was manage a set of sensible, personalized, non-standard behaviours for each tool I used, and have a way of distributing those across systems. What I didn’t need at all, after all, was anything that installed different things on different hosts or classes of hosts. Luckily, every tool I want to configure has a…
I do this by having ~/.config/tool/blah.conf as you'd expect; but also ~/.config/by-host/$hostname/tool/blah.conf
I agree 'classes of hosts' is way overkill for probably anyone's personal machines though. Only thing close to that I do is with aconfmgr for more system-oriented stuff - but that's all simply on the basis 'if SSD enable TRIM' type 'classes', no manual specification.