Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have a similar system: I manage my dot files and a bunch of other configs by placing a git repository in my operating system's root directory, i.e. file:///.git. I use a .gitignore file to exclude most things from consideration while adding things to git. Transferring to another OS is as simple as copying the .git dir over.


Before your comment I never considered the inverse of .gitignore but apparently it’s very easy to do! https://stackoverflow.com/questions/987142/make-gitignore-ig...


This is cool, but I actually place ignored paths into the gitignore manually. This way I will always see reminders when a new file needs to be tracked or ignored. Otherwise I would forget to track new config files. E.g. when a new program is installed, its binary will be ignored by a previous rule added to gitignore (/use/bin/*), but its newly created config files in /etc will come up red when I run `git status`.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: