I started managing my dotfiles in git and followed the pattern I found in Anders Knudsen's repository below. The most painful thing has been coming up with config that works across Linux and MacOS, but that's been chosen pain that can easily be avoided. https://github.com/andersix/dotfiles
Dotfiles: Unofficial Guide to Dotfiles on GitHub
41–50 of 74 posts
Re: Dotfiles: Unofficial Guide to Dotfiles on GitHub
#42Earlier quoted context omitted.
Seconding Chezmoi, it's what I use, and it works well.
Third here, it's the easiest tool to setup dotfiles that work on machines ranging from RHEL7 to latest MacOS. Haven't dealt with Windows dotfiles though.
Being able to run `chezmoi diff` and `chezmoi apply` are game changers.
Re: Dotfiles: Unofficial Guide to Dotfiles on GitHub
#43All you need is a symlink script that symlinks files in ~ to ~/path/to/your/dotfiles https://github.com/pprotas/dotfiles/blob/main/symlink.sh That's it.
Maybe you haven't lost data from this yet, but this is where Chezmoi has nice guardrails and protects against, e.g., modifications or additions accidentally being made to $HOME instead of the dotfiles dir, which look like they would be silently blown out by your current process.
Just my 2¢ from someone who used to do it this way and lost data because of it.
Re: Dotfiles: Unofficial Guide to Dotfiles on GitHub
#44All you need is a symlink script that symlinks files in ~ to ~/path/to/your/dotfiles https://github.com/pprotas/dotfiles/blob/main/symlink.sh That's it.
Sure, maybe. Though eventually one may find lots of edge cases. What about files in the root that get deleted? What about programs that put wanted state within config dirs? What about programs that ignore symlinked files? What about when you’re hacking on your dotfiles and break everything because the active config is the config being edited? What about when you need to vary based on system? What about… I mean, yea,…
Re: Dotfiles: Unofficial Guide to Dotfiles on GitHub
#45just setup a bare repo and call it a day. https://www.atlassian.com/git/tutorials/dotfiles original thread on HN: https://news.ycombinator.com/item?id=11070797
Re: Dotfiles: Unofficial Guide to Dotfiles on GitHub
#46Gnu stow has finally been updated to fix a long standing issue so I can once again wholeheartedly recommend it again! It’s lightweight and uses symlinks. Last I checked, chezmoi has a symlink mode but it’s a bit worse.
I guess you're referring to this ? https://github.com/aspiers/stow/issues/65
Re: Dotfiles: Unofficial Guide to Dotfiles on GitHub
#47Gnu stow has finally been updated to fix a long standing issue so I can once again wholeheartedly recommend it again! It’s lightweight and uses symlinks. Last I checked, chezmoi has a symlink mode but it’s a bit worse.
Curious what the issue you were running into was? I’ve been using stow for my dotfiles for at least 8 years now and have been loving it the whole time.
Basically, the --dotfiles option was not working with directories so you had to have things that look like this: lazygit/.config/lazygit and now it looks like: lazygit/dot-config/lazygit.
Really a small issue that bugged me forever - shouldn't have made it seem like it was core a problem with stow!
Re: Dotfiles: Unofficial Guide to Dotfiles on GitHub
#48Gnu stow has finally been updated to fix a long standing issue so I can once again wholeheartedly recommend it again! It’s lightweight and uses symlinks. Last I checked, chezmoi has a symlink mode but it’s a bit worse.
What's the issue? I've been using stow for a decade now and can't recall ever running into problems
Basically, the --dotfiles option was not working with directories so you had to have things that look like this: lazygit/.config/lazygit and now it looks like: lazygit/dot-config/lazygit.
Really a small issue that bugged me forever - shouldn't have made it seem like it was core a problem with stow!
Re: Dotfiles: Unofficial Guide to Dotfiles on GitHub
#49I started managing my dotfiles in git and followed the pattern I found in Anders Knudsen's repository below. The most painful thing has been coming up with config that works across Linux and MacOS, but that's been chosen pain that can easily be avoided. https://github.com/andersix/dotfiles
In the end, how you do it is personal pref. I liken it to editor wars, vim vs emacs, etc. What works for me, may not work for you.
PS: these are my dotfiles (link is my repo), and I've used this method for some 5 plus yrs now and it works well for me. I really like how easy it is to spool up a new linux instance and have my config ready to go in mere seconds.
I've not used branches yet, for different OS'en, so my zshrc and bashrc have conditional checks for OS. I will be looking at using branches in the future since it does sound like it would make shell rc files cleaner.
Re: Dotfiles: Unofficial Guide to Dotfiles on GitHub
#50All you need is a symlink script that symlinks files in ~ to ~/path/to/your/dotfiles https://github.com/pprotas/dotfiles/blob/main/symlink.sh That's it.
https://github.com/matheusmoreira/.files/blob/master/GNUmake...
https://www.matheusmoreira.com/articles/managing-dotfiles-wi...
It even supports the XDG stuff as well as variables like GNUPGHOME.