Live data from Hacker News

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

dotfiles.github.com

1–10 of 39 posts

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

#4
I've meant to finally put my dotfiles into a repository but the one thing keeping me from it is that I haven't yet stumbled upon a script to symlink everything into it's place that I'm totally satisfied with.

I don't use ruby and don't want to install rake on each machine for something that should be possible with a simple shell script, and didn't like the scripts I saw so far. Everything had a medium or large aspect that kept me from using it.

Maybe I just need to write my own thing.

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

#5
post #4

I've meant to finally put my dotfiles into a repository but the one thing keeping me from it is that I haven't yet stumbled upon a script to symlink everything into it's place that I'm totally satisfied with. I don't use ruby and don't want to install rake on each machine for something that should be possible with a simple shell script, and didn't like the scripts I saw so far. Everything had a medium or large aspect…

I would recommend it. I'm not fully happy yet with my setup, but it's all in bash, and fairly simple really. Plus, when you do it yourself you will understand everything you do, and be less likely to screw up something you didn't actually want changed.

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

#6
post #4

I've meant to finally put my dotfiles into a repository but the one thing keeping me from it is that I haven't yet stumbled upon a script to symlink everything into it's place that I'm totally satisfied with. I don't use ruby and don't want to install rake on each machine for something that should be possible with a simple shell script, and didn't like the scripts I saw so far. Everything had a medium or large aspect…

I highly recommend not symlinking things at all; just have the repository itself as your home directory.

Whenever I set up a new machine, I always do this:

    git clone git://joshtriplett.org/git/home
    mv home/.git .
    rm -rf home
    git checkout -f
(There probably exists a simpler way to do that, but I haven't found it yet.)

I can always check out my repository via git:// even on a machine where I want to push to it, because my repository includes a ~/.gitconfig containing:

    [url "ssh://joshtriplett.org/"]
            pushInsteadOf = "git://joshtriplett.org/"
So, I can automatically push as long as I have SSH access to my server. (I wrote the support for pushInsteadOf in upstream git, specifically to enable this use case.)

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

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

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

#8
post #4

I've meant to finally put my dotfiles into a repository but the one thing keeping me from it is that I haven't yet stumbled upon a script to symlink everything into it's place that I'm totally satisfied with. I don't use ruby and don't want to install rake on each machine for something that should be possible with a simple shell script, and didn't like the scripts I saw so far. Everything had a medium or large aspect…

I highly recommend not symlinking things at all; just have the repository itself as your home directory. Whenever I set up a new machine, I always do this: git clone git://joshtriplett.org/git/home mv home/.git . rm -rf home git checkout -f (There probably exists a simpler way to do that, but I haven't found it yet.) I can always check out my repository via git:// even on a machine where I want to push to it, because…

I don't know if it's any simpler, but I tend to do:

    git init .
    git remote add origin git://github.com/eentzel/dotfiles.git
    git checkout -t origin master

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

#9
post #4

I've meant to finally put my dotfiles into a repository but the one thing keeping me from it is that I haven't yet stumbled upon a script to symlink everything into it's place that I'm totally satisfied with. I don't use ruby and don't want to install rake on each machine for something that should be possible with a simple shell script, and didn't like the scripts I saw so far. Everything had a medium or large aspect…

I just use a bash script that I add a line to symlink each config to the correct location. I really like this as I know exactly what's happening.

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

#10

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

Towards that end, (and for keeping certain sensitive things from repos...) I made this:

https://github.com/sophacles/dotfuse

It is a fuse filesystem that allows for modularization of some "single file" style dotfiles. Combined with git branche or modules (or both) it can get a lot of this (i hope). Warning though, it is still a bit of a toy, and I haven't played with it for a while, but I'm open to suggestions and pull requests!

As for dry with sourceable stuff, like bash/zsh configs, you can just keep the environment specific stuff in a separate repo, and use git modules, that is if your environ specific stuff needs to be confidential (or some of it) and kept in separate private repos.

Post reply on HN