Way to store your dotfiles: A bare Git repository (2016)
1–10 of 60 posts
Re: Way to store your dotfiles: A bare Git repository (2016)
#2 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)
#3Re: Way to store your dotfiles: A bare Git repository (2016)
#4My dotfiles git repo is meant to be cloned in my home directory. It comes with this .gitignore committed in the repo:
/*
!/.vim/
/.vim/.netrwhist
Basically it ignores everything in my home directory, unless I explicitly `git add` it, which matches my workflow. For the few cases where I want to notice changes (like the entire ~/.vim/ subdirectory), I explicitly un-ignore it as you can see above.The only downside I've experienced is my bash PS1 prompt shows the status of the dotfiles repo (branch/dirty/etc) in any directory I'm in that's inside my home dir - I've learnt to ignore it, and it doesn't interfere with CDing into an actual directory that's its own git repo.
Re: Way to store your dotfiles: A bare Git repository (2016)
#5Seems 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)
#6Seems 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)
#7Seems 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?
I use stow. But honestly, I don't think it's better than git.
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)
#8Seems 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?
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)
#9Seems 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?
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)
#10Seems 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?
I use stow. But honestly, I don't think it's better than git.