Live data from Hacker News

Dotfiles.github.com - A guide to dotfiles on GitHub

dotfiles.github.com

31–39 of 39 posts

Re: Dotfiles.github.com - A guide to dotfiles on GitHub

#32
post #26

I highly recommend using symlinks to synchronize dotfiles with a locally cloned repo. That way, you can make changes to the dotfiles sitting in your home directory and it'll be reflected in your repo should you want to commit those changes.

Wait, I've done it the other way around. I have a repo directory, and I created symlinks in ~/ pointing to the dotfiles in the repo. I have a simple install script to symlink the files.

Would you suggest having the physical files in ~/ and adding their symlinks to a repo?

Re: Dotfiles.github.com - A guide to dotfiles on GitHub

#33
post #31

A Rakefile for dotfiles? Seriously?

Why not? I've been using it without any problems. It's just easier to manage.

Because not everyone has a Ruby development environment available. It would be a lot better idea to stick with Makefiles or other more commonly available Unix tools.

A lot of Ruby people seem to add a Rakefile or a Ruby script to do some simple task like installing a few dotfiles. That makes them a lot less useful to me (for example), as I don't have a Ruby env available on all machines I use.

Same goes for Node.js, Python and Perl people. If a "standard unix" tool can do something almost as easily as a Rakefile/whatever, you should probably stick to the standard tools. I don't know what you should do with Windows, though.

Re: Dotfiles.github.com - A guide to dotfiles on GitHub

#34
post #32
post #26

I highly recommend using symlinks to synchronize dotfiles with a locally cloned repo. That way, you can make changes to the dotfiles sitting in your home directory and it'll be reflected in your repo should you want to commit those changes.

Wait, I've done it the other way around. I have a repo directory, and I created symlinks in ~/ pointing to the dotfiles in the repo. I have a simple install script to symlink the files. Would you suggest having the physical files in ~/ and adding their symlinks to a repo?

I would think he meant what you said.... symlinks in the repo doesn't sound a good idea.

Re: Dotfiles.github.com - A guide to dotfiles on GitHub

#36
A workaround to the "symlink farm" method is making use of "--config=PATH" options for most apps and setting up aliases.

Conforming to the XDG base dir standard as much as possible makes sense but can get painful sometimes (e.g. vim: http://tlvince.com/2011/02/03/vim-respect-xdg/).

Re: Dotfiles.github.com - A guide to dotfiles on GitHub

#37
post #27

With respect, a guide to dotfiles should explain what dotfiles are.

If someone needs to ask what dotfiles are, they aren't in the target audience of this project.

I have to disagree - I had never heard the term before, but now that I see the power/convenience of a symlinked configuration, I'm interested in learning more.

I'm sure many others like myself would appreciate a more thorough, introductory walkthrough. I'll be asking my more hard-core friends for guidance in the meantime.

Re: Dotfiles.github.com - A guide to dotfiles on GitHub

#38

While we're on the subject - has anyone found a good way to separate environments while keeping your setup fairly DRY? e.g. I have slight variations in my aliases for work/home, different git config email etc. You can find mine here: http://github.com/adamgibbins/dotfiles

Here's my solution: https://bitbucket.org/davidn/dotstuff

Briefly: ~/dotstuff is a hg/git/whatever repo that contains your dotfiles, which can optionally use simple preprocessor directives to turn on or off different sections on different systems, or contain macro substitutions. You run 'dot' and it shows you a diff between what's in the repo and what's in your filesystem. Then run 'dot -g' to make the changes (with optional backups). Also manages crontabs.

I wrote it about four years ago and have been using it happily since then to manage dotfiles on 2-4 different systems. (I wrote the README today before posting this, which is why it has today's date.)

Re: Dotfiles.github.com - A guide to dotfiles on GitHub

#39
post #26

I highly recommend using symlinks to synchronize dotfiles with a locally cloned repo. That way, you can make changes to the dotfiles sitting in your home directory and it'll be reflected in your repo should you want to commit those changes.

I just track ~/ directly and add appropriate .gitignore entries to those files which are ephemeral or not part of my local configuration:

https://github.com/uggedal/dotfiles/blob/master/.gitignore

Post reply on HN