I use something even simpler My dotfiles git repo is meant to be cloned in my home directory. It comes with this .gitignore committed in the repo: /* !/.vim/ /.vim/.netrwhist Basically it ignores everything in my home directory, unless I explicitly `git add` it, which matches my workflow. For the few cases where I want to notice changes (like the entire ~/.vim/ subdirectory), I explicitly un-ignore it as you can see…
I think that method requires git to scan all the files in the directory so it can then ignore them. The advantage of the “showUntrackedFiles no” method is that git will only look at the tracked files, which is much faster if you have a million files in your home dir, like I do. (Or so I believe.)
Way to store your dotfiles: A bare Git repository (2016)
51–60 of 60 posts
Re: Way to store your dotfiles: A bare Git repository (2016)
#52I don't understand how the curl http://site.com | bash anti-pattern has become so widespread. Especially with -k.
It originated as a way for people who aren't familiar with CLI to install things. People have now been trained to expect this level of simplicity. I've worked with people that will blindly copy and paste these lines into terminals, having absolutely no idea what they do, and even blindly type in sudo password when prompted. It's basically the worst of all worlds from a security perspective. In my opinion this should…
Re: Way to store your dotfiles: A bare Git repository (2016)
#53Re: Way to store your dotfiles: A bare Git repository (2016)
#54Re: Way to store your dotfiles: A bare Git repository (2016)
#55This could lead to a potential security issue. Imagine there's a misconfiguration in your dotfiles -- now it's public.
Re: Way to store your dotfiles: A bare Git repository (2016)
#56Seems much more complicated compared to: git checkout https://github.com/my/dotfiles.git cd dotfiles # this is little more than `find . -maxdepth 1 -exec ln -sf {} ~/ \;` ./install How are others here managing their dotfiles?
I do almost exactly the same as you; my install.sh is a glorified wrapper around `ln -s`, but for each file, it verifies whether the file is already symlinked and if not renames the original to something like `.foo.bak.$(date -I)`. This is probably overkill, but it was especially nice when I was just starting to version control my dotfiles and still found unmanaged files sometimes that contained things worth saving.
Re: Way to store your dotfiles: A bare Git repository (2016)
#57Earlier quoted context omitted.
There's a lot of dotfiles on Github and it doesn't seem to be a problem (Except if you check in private credentials, but that's not a problem unique to dotfiles). If you rely on your configuration to be secret to be secure it's just security by obscurity and not worth much anyway.
> If you rely on your configuration to be secret to be secure it's just security by obscurity and not worth much anyway. What I had in mind is that the average person wouldn't be a target, but publicly declaring their security vulnerability would attract attacks they wouldn't receive otherwise.
The solution isn’t particularly hard either, simply source a secrets file and make sure you add that to the gitignore file.
Re: Way to store your dotfiles: A bare Git repository (2016)
#58I'm still looking for a good way to I'm using this approach, but looking for a way manage dotfiles for multiple machines. Having separate branches feels clunky, since there is a lot of overlap and tweak may involve making the same tweak on several branches. Any recommendations for managing this situation?
Surprised nobody has mentioned YADM - it can do per-device files and/or per-device templating too (jinja2 syntax). It's just a thin wrapper around git so you can use any git commands too. http://yadm.io
I put up my dotfiles here https://github.com/thingfox/dotfiles (sample documentation repository with examples), in it I show how I did the templating for ssh hosts amongst other configs.
This allows me to remove the most sensitive data and use the https://yadm.io/docs/encryption option for that.
The https://yadm.io/docs/bootstrap feature is also awesome as is https://yadm.io/docs/alternates
Re: Way to store your dotfiles: A bare Git repository (2016)
#59This could lead to a potential security issue. Imagine there's a misconfiguration in your dotfiles -- now it's public.
Yadm, a thin wrapper around git allows for alternate files, encryption and templating. See my post https://news.ycombinator.com/item?id=19594859
https://github.com/thingfox/dotfiles
https://yadm.io/docs/encryption
Re: Way to store your dotfiles: A bare Git repository (2016)
#60I don't understand how the curl http://site.com | bash anti-pattern has become so widespread. Especially with -k.
[0] - https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-b...