News for hackers. Stuff that matters.
Re:Way to store your dotfiles: A bare Git repository (2016) by mikewhy on Saturday April 06, 2019 @11:56AM (#19591363)
Seems much more complicated compared to:

    git checkout https://github.com/my/dotfiles.git
    cd dotfiles
    # this is little more than `find . -maxdepth 1 -exec ln -sf {} ~/ \;`
    ./install
How are others here managing their dotfiles?
Re:Way to store your dotfiles: A bare Git repository (2016) by sametmax on Saturday April 06, 2019 @12:13PM (#19591447)
I use stow. But honestly, I don't think it's better than git.
Re:Way to store your dotfiles: A bare Git repository (2016) by rudiv on Saturday April 06, 2019 @12:23PM (#19591509)
Same - git repository (I presume), and GNU stow. Stow is a good way to maintain symlinks, but I see the value of not having that additional dependency. The OP's method is nifty, I might try it out.
Re:Way to store your dotfiles: A bare Git repository (2016) by yjftsjthsd-h on Saturday April 06, 2019 @12:18PM (#19591475)
It's orthogonal, isn't it? You keep your dotfiles in a repo, then have stow "install" the checkout/clone thereof.

EDIT: Also on stow - I tried it a couple times and it never seemed flexible enough. Can it handle things like keeping ~/.config/nvim and ~/.vim in the same stow directory? (And for that matter, can it link them together? I like having the same config for vim and neovim)

Re:Way to store your dotfiles: A bare Git repository (2016) by th3ant on Saturday April 06, 2019 @02:12PM (#19592158)
Re: your edit, Yeah it can! Set up a folder, say 'vim' for your example, and then inside of that folder you have a '.vim' file and a '.config/nvim' file.

Then when you run `stow vim` from the parent of the original 'vim' folder it will symlink everything in there to ~.

You can even have more folders that have a '.config/foobar' inside of them, and when you stow those it will all work itself out nicely!

Edit: You can find examples of this in my dotfiles https://github.com/AnthonyWharton/dotfiles/ (I use stow if you didn't guess :P). For example look at the 'i3' folder and the 'polybar' folder, they both add things to '~/.config '

Re:Way to store your dotfiles: A bare Git repository (2016) by rudiv on Saturday April 06, 2019 @12:24PM (#19591515)
I just have both directories in my dotfiles repo and have the vim one symlinked to the nvim one. Admittedly I haven't fully explored the capabilities of stow, there might be a better way.
Re:Way to store your dotfiles: A bare Git repository (2016) by joombaga on Saturday April 06, 2019 @12:18PM (#19591478)
Are you using stow for some specific reason? Or just trying it out?
Re:Way to store your dotfiles: A bare Git repository (2016) by sametmax on Saturday April 06, 2019 @12:40PM (#19591587)
Inertia
Re:Way to store your dotfiles: A bare Git repository (2016) by yjftsjthsd-h on Saturday April 06, 2019 @12:17PM (#19591471)
I do almost exactly the same as you; my install.sh is a glorified wrapper around `ln -s`, but for each file, it verifies whether the file is already symlinked and if not renames the original to something like `.foo.bak.$(date -I)`. This is probably overkill, but it was especially nice when I was just starting to version control my dotfiles and still found unmanaged files sometimes that contained things worth saving.
Re:Way to store your dotfiles: A bare Git repository (2016) by mikewhy on Saturday April 06, 2019 @12:54PM (#19591661)
I do the same! https://github.com/mikew/dotfiles/blob/master/install.sh#L26...

Although yours is more sound, I'm just moving files to `*.old`.

Re:Way to store your dotfiles: A bare Git repository (2016) by jakeogh on Saturday April 06, 2019 @09:49PM (#19594273)
Re:Way to store your dotfiles: A bare Git repository (2016) by joombaga on Saturday April 06, 2019 @12:19PM (#19591486)
Can you share?
Re:Way to store your dotfiles: A bare Git repository (2016) by yjftsjthsd-h on Saturday April 06, 2019 @12:28PM (#19591530)
Sure! https://gitlab.com/snippets/1844438

EDIT: Some quirks to note, especially if you want to steal this script: 1. I use ~/.local/etc as my dotfile directory. 2. I support multiple shells but have all of them use ~/.profile rather than shell-specific files (most config overlaps, and there's a case stmt that deals with per-shell settings). 3. The vim/neovim bit at the bottom will fail silently if the directory already exists; thankfully this is rare, but it should be fixed some time.

Re:Way to store your dotfiles: A bare Git repository (2016) by lscotte on Saturday April 06, 2019 @12:33PM (#19591560)
I use a combination of stow and git via a script I wrote that I call stash - https://github.com/scotte/stash - it's very basic and simple, but has served me well.