Hacker News new | past | comments | ask | show | jobs | submit login

I do the same, but I just have a single '*' in my .gitignore.

The only drawback to the homedir-as-git-repo approach I've found is that you're always in a git repo, so you have to be careful not adding stuff which was really supposed to go in another repo.




Here's a better solution.

https://www.atlassian.com/git/tutorials/dotfiles

TL;DR:

  alias dotfiles='/usr/bin/git --git-dir=$HOME/src/dotfiles --work-tree=$HOME'
  dotfiles add
  dotfiles commit
  ...


I really like that solution, thanks. It also means I can easily move my current git dir to the new place and still have everything work.

Does anyone know if syncing a git repo over Syncthing (or similar) is a good idea or whether there are likely to be conflicts? I don't know if git names its files such that conflicts aren't possible.


Brilliant, thanks!


> The only drawback to the homedir-as-git-repo approach I've found is that you're always in a git repo, so you have to be careful not adding stuff which was really supposed to go in another repo.

I tend to always run "git status" before adding anything, which makes it fairly obvious what repository I'm in. (Or I'm working via fugitive in vim, which helps in the same way.)




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: