News for hackers. Stuff that matters.
Re:Using GNU Stow to manage your dotfiles (2012) by JoshTriplett on Monday December 28, 2020 @11:39PM (#25566786)
> Call me old fashioned but what's wrong with having a regular git repo anywhere you want with all of your dotfiles and them symlink those files to where they need to go?

I prefer to skip the symlinks, and just directly use the git repository as my home directory. (I have a sizable .gitignore for things I don't want to track.)

Re:Using GNU Stow to manage your dotfiles (2012) by yesbabyyes on Tuesday December 29, 2020 @02:34AM (#25567624)
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.

Re:Using GNU Stow to manage your dotfiles (2012) by scaladev on Tuesday December 29, 2020 @06:00AM (#25568661)
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
  ...
Re:Using GNU Stow to manage your dotfiles (2012) by StavrosK on Tuesday December 29, 2020 @06:07AM (#25568690)
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.

Re:Using GNU Stow to manage your dotfiles (2012) by yesbabyyes on Tuesday December 29, 2020 @06:58AM (#25568944)
Brilliant, thanks!
Re:Using GNU Stow to manage your dotfiles (2012) by JoshTriplett on Tuesday December 29, 2020 @03:11PM (#25574256)
> 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.)

Re:Using GNU Stow to manage your dotfiles (2012) by CUViper on Tuesday December 29, 2020 @03:31AM (#25567878)
I do it with a renamed `.git` and a bash alias `githome` that points `git` to the right place. This way it doesn't look like my home is a repo in normal use.