Unofficial guide to dotfiles on GitHub
41–50 of 65 posts
Re: Unofficial guide to dotfiles on GitHub
#42I find the problem with "set and forget" kind of jobs is that you forget how to do something because someone else already did it for you, so you don't learn anything. It's similar to joining a complicated project where everything has been set up for you and all problems were solved and if you were to join a new project from day 1 you would have to learn everything again. (See setting up CI/CD, the structure of a java project, a gradle file, a maven POM, Dockerfiles, git, Kubernetes manifests and other devops tasks)
You still need to learn how to do things. I want to be fluent in the tools I use, so I would rather do things from memory.
Re: Unofficial guide to dotfiles on GitHub
#43Re: Unofficial guide to dotfiles on GitHub
#44tl;dr: Create a .gitignore in your ~ with an asterisk on the first line and `!.dotfilename` on subsequent lines; the asterisk means Git will ignore everything, and the ! means Git will un-ignore that specific file or directory. (Be sure to include the .gitignore file itself.) Use Git as normal and push. To deploy on another machine/account, the easiest method is to check out as normal into a temporary directory, then…
One potential drawback of doing that is that every directory under ~/ that is not itself part of another git repository becomes part of that git repository, which could make some programs act weird, particularly project auto-detectors in IDEs and such. To avoid that, one can rename the `.git` folder, effectively disabling auto-discovery, and run git with the option `--git-dir= `.
[status]
showUntrackedFiles = no
That solves most of those problems, as git will only consider files already in the repository and ignore everything else in your home directory.Re: Unofficial guide to dotfiles on GitHub
#451: https://www.gnu.org/software/stow/ 2: https://wiki.archlinux.org/title/XDG_Base_Directory
Re: Unofficial guide to dotfiles on GitHub
#46There are so many utilities. Why not just use ansible? It can manage your dotfiles and much more (you can configure your whole machine).
What I do with RasPi servers is I make a pull and a push playbook that live in a repo, which let me deploy what I have onto a new server, and pull any changes made in server web GUIs into the repo where I can commit them.
Then of course any other random periodic task also becomes an Ansible task.
If I had a use case for lots of random little scripts on my main machine, I think I'd choose Ansible over bash where practical, you get so many tools premade, and you can run local or remote all the same.
Re: Unofficial guide to dotfiles on GitHub
#47Just 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
I use it in combination with a make to automate the setup of a new install.
Re: Unofficial guide to dotfiles on GitHub
#48I have my home directory as a git repo: works great, simple, no symlinking
Interesting. But I guess there must be files that you don't check in because of size?
Re: Unofficial guide to dotfiles on GitHub
#49Re: Unofficial guide to dotfiles on GitHub
#50Just 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