Live data from Hacker News

Ask HN: What do you use to manage dotfiles?

news.ycombinator.com

91–97 of 97 posts

Re: Ask HN: What do you use to manage dotfiles?

#91

Emacs Org-mode's org-babel functionality. I have a few org-mode files storing all the dotfiles, put under version control. I can update and deploy them from within Emacs.

fascinating. never heard of doing something like this, though i use emacs all day long (but not org mode -- didn't even know org mode could do this).

You might enjoy this then:

https://github.com/skx/dotfiles/tree/master/.emacs.d

In there you'll find ~/.emacs/init.el which parses ~/.emacs/init.md which is a markdown file containing both documentation and executable Lisp.

There are other files in separate directories/packages, but I like the idea of placing everything in one readable file:

https://github.com/skx/dotfiles/blob/master/.emacs.d/init.md

Re: Ask HN: What do you use to manage dotfiles?

#93
post #53

Earlier quoted context omitted.

I'm trying to reproduce it and documenting it as I go... ok I got it working now and I have notes. Stay tuned.

It's probably better if you do it then :-) I would probably skip some important parts trying to explain because I'm too much used to it already.

Finally got mine working, it does need some figuring out especially the replication part. I documented the needed commands here: https://github.com/Siilwyn/my-dotfiles/tree/master/.my-dotfi...

Re: Ask HN: What do you use to manage dotfiles?

#94

I use: git init --bare $HOME/.myconf alias config='/usr/bin/git --git-dir=$HOME/.myconf/ --work-tree=$HOME' config config status.showUntrackedFiles no where my ~/.myconf directory is a git bare repository. Then any file within the home folder can be versioned with normal commands like: config status config add .vimrc config commit -m "Add vimrc" config add .config/redshift.conf config commit -m "Add redshift config"…

As promised I wrote a post about your setup. Thanks a lot for bringing the technique to my attention: https://developer.atlassian.com/blog/2016/02/best-way-to-sto...

Re: Ask HN: What do you use to manage dotfiles?

#95
post #93

Earlier quoted context omitted.

It's probably better if you do it then :-) I would probably skip some important parts trying to explain because I'm too much used to it already.

Finally got mine working, it does need some figuring out especially the replication part. I documented the needed commands here: https://github.com/Siilwyn/my-dotfiles/tree/master/.my-dotfi...

I'll check how you did it. I wrote my notes and a couple of scripts down in a post: https://developer.atlassian.com/blog/2016/02/best-way-to-sto...

Re: Ask HN: What do you use to manage dotfiles?

#96

Earlier quoted context omitted.

To complete the description of the workflow (for others), you can replicate your home directory on a new machine using the following command: git clone --separate-git-dir=~/.myconf /path/to/repo ~ This is the best solution I've seen so far, and I may adopt it next time I get the itch to reconfigure my environment.

For posterity, note that this will fail if your home directory isn't empty. To get around that, clone the repo's working directory into a temporary directory first and then delete that directory, git clone --separate-git-dir=$HOME/.myconf /path/to/repo $HOME/myconf-tmp cp ~/myconf-tmp/.gitmodules ~ # If you use Git submodules rm -r ~/myconf-tmp/ alias config='/usr/bin/git --git-dir=$HOME/.myconf/ --work-tree=$HOME' a…

I found out exactly the same problem :)

Re: Ask HN: What do you use to manage dotfiles?

#97
post #94

I use: git init --bare $HOME/.myconf alias config='/usr/bin/git --git-dir=$HOME/.myconf/ --work-tree=$HOME' config config status.showUntrackedFiles no where my ~/.myconf directory is a git bare repository. Then any file within the home folder can be versioned with normal commands like: config status config add .vimrc config commit -m "Add vimrc" config add .config/redshift.conf config commit -m "Add redshift config"…

As promised I wrote a post about your setup. Thanks a lot for bringing the technique to my attention: https://developer.atlassian.com/blog/2016/02/best-way-to-sto...

Really nice, well explained. I'll know where to point people to when I need to present this techique. Thanks!
Post reply on HN