Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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


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


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].

[0] https://raw.github.com/dgellow/home/master/.gitignore


I actually prefer to .gitignore things explicitly, because then any new dotfiles show up in "git status" until I explicitly disposition them.


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 don't keep anything but text files in my dotfile repo, so I haven't had to deal with this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: