Live data from Hacker News

Ask HN: What do you use to manage dotfiles?

news.ycombinator.com

51–60 of 97 posts

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

#51

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.

Interesting approach! Think you can provide us with a small working example, especially the 'deploy' part?

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

#53
post #31

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"…

Can you write a blog post on your workflow? I would love to learn more on how you to use it :P

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

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

#54
post #46

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"…

"branches for different computers" sounds tedious if most changes are for every computer.

I have a "master" branch, and some "computer" branches. When changes are required for all computer, I do it in "master", and then update each branch by doing a "git merge master".

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

#55

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"…

Why is this a bare repo as opposed to a normal one?

Because the working tree is already your home folder, you don't need to also have a copy of these files in ".myconf/".

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

#56
post #37

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"…

I'm confused - you can add files that are in a parent directory?

It's because we specify to git that the working tree is the home folder. For it the versionning doesn't happen in ".myconf", but directly in the home folder

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

#57
post #31

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"…

Can you write a blog post on your workflow? I would love to learn more on how you to use it :P

There are probably already posts about this: I didn't invented it, I read it somewhere… but it was long time ago, I don't remember where.

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

#58
post #53
post #31

Earlier quoted context omitted.

Can you write a blog post on your workflow? I would love to learn more on how you to use it :P

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.

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

#59
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.

Working on it! I'll give you full credit for it and link to this thread for reference. Also let me know if you have a Twitter account you'd like me to reference.

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

#60

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"…

You mean, you are also adding pushing your .ssh dir to a remote repo?
Post reply on HN