Re:Using GNU Stow to manage your dotfiles
by pielud on Wednesday September 04, 2013 @10:05PM
(#6331776)
I take a similar approach. I have a dotfiles git repo in ~/dotfiles/ and have a Makefile which creates symlinks in my home directory. For example, ~/.bashrc is a symlink to ~/dotfiles/bashrc. That way, I can have a whitelist (whatever's in the Makefile) instead of a blacklist (like a .gitignore).
Re:Using GNU Stow to manage your dotfiles
by zeckalpha on Wednesday September 04, 2013 @10:52PM
(#6331913)
The fake bare approach might be easier: http://mjollnir.org/blog/migrating-my-homedirectory-from-one...
Re:Using GNU Stow to manage your dotfiles
by scottjad on Wednesday September 04, 2013 @11:15PM
(#6331965)
My main problem with this is it leads to accidentally executing git commands on your dotfiles repo.
Like, say you thought ~/src/xulrunner was a git repo, but it was actually managed with hg or maybe was extracted from a tarball. Whereas normally executing some git command would complain that this is not a repo, if your ~ is a git repo then git will happily execute whatever you told it to on your dotfiles repo.
Re:Using GNU Stow to manage your dotfiles
by Argorak on Thursday September 05, 2013 @01:16AM
(#6332303)
For git repositories that are not touched very often, you can move the .git directory to something that isn't picket up automatically. Use it like this:
mv .git dot_git
git --git-dir="dot_git" add ...
Thats also a nice trick if you need a git repos in a git repos, e.g. for integration test for libraries interacting with git.Be careful, this is how devs expose private ssh keys.
I push it to a local git repo that has the same perms as my account and .ssh directory. But, I agree. You need to be careful.
Re:Using GNU Stow to manage your dotfiles
by cespare on Wednesday September 04, 2013 @10:20PM
(#6331817)
I also keep my whole homedir in git, and it's great. My approach isn't to .gitignore, because I want to ignore almost everything -- I just add and commit things when I want to track them. One of my many git aliases[1] is 'git sn' for showing status without untracked files; this helps when dealing with my homedir:
status --short --branch --untracked=no
[1] https://github.com/cespare/dotfiles/blob/master/.gitconfig#L...
Re:Using GNU Stow to manage your dotfiles
by oops on Wednesday September 04, 2013 @11:38PM
(#6332014)
I have my homedir in git too and also ignore just about everything. I ended up using gitignore as a whitelist instead of a blacklist, e.g.:
/*
!/.gitignore
!/.gitmodules
!/.gitconfig
!/.zshrc
!/.zshenv
!/.zsh
!/.tmux.conf
!/.vimrc
!/.vim
Re:Using GNU Stow to manage your dotfiles
by dgellow on Thursday September 05, 2013 @05:05AM
(#6332964)
I have a close setup. It just needs a little trick to add subdirectories :
/*
!/.emacs
!/.emacs.d/
/.emacs.d/*
!/.emacs.d/themes/
!/.emacs.d/functions/
You can check my .gitignore here [0].
Re:Using GNU Stow to manage your dotfiles
by JoshTriplett on Wednesday September 04, 2013 @10:38PM
(#6331869)
I actually prefer to .gitignore things explicitly, because then any new dotfiles show up in "git status" until I explicitly disposition them.
Re:Using GNU Stow to manage your dotfiles
by dhimes on Thursday September 05, 2013 @08:57AM
(#6333818)
I wondered about this, but I pose this question to you: what happens if you have a merge problem with, say, a libreoffice doc or something. How do you handle that? I use hg, but I imagine my plight would be similar. TIA.
I totally disagree. I love having much of my home directory in git. I have a .gitiignore for the stuff I don't want in there, but the rest. Ahhhhh, so nice to be able to clone somewhere else and use.