News for hackers. Stuff that matters.
Re:Using GNU Stow to manage your dotfiles (2012) by 5e92cb50239222b on Wednesday July 27, 2022 @01:09PM (#32253175)
I very much prefer this simple method:

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

tl;dr: it puts the .git directory aside and lets you use it to store any files on your filesystem.

All the usual commands work, except you use something like `config` or `dofiles` instead of `git`:

  $ config add ~/.config
  $ config commit -m initial\ commit
It's pretty much the same as creating a git repository in /, but doesn't mess with your normal git usage (so if you run `git status` in `/home/foo/src/my-awesome-project` and git repository has not been created there yet, git will fail with "not a git repository" and won't show you the contents of your whole filesystem tree).
Re:Using GNU Stow to manage your dotfiles (2012) by pjz on Thursday July 28, 2022 @02:25AM (#32261049)
I've been doing this for a few years now and definitely agree! I use .home.git as my .git-aside name and also named the access alias 'homegit'.

I didn't know about `git config --local status.showUntrackedFiles no` so I just put '/*' into .home.git/info/exclude, and then of course tracked that in itself by adding '!/.home.git/info/exclude' in there too.

It's been amazingly useful when acquiring a new laptop, or wanting to quickly set up a comfortable environment on remote machines.

Interestingly, I got it from a Stackoverflow answer (https://stackoverflow.com/a/27336975/8002) and not the atlassian tutorial you listed.

Re:Using GNU Stow to manage your dotfiles (2012) by publicdaniel on Wednesday July 27, 2022 @02:17PM (#32254335)
This is what I do, it has worked great for me. The only annoying thing is I can’t get tab completing to work in my shell (ZSH). Something about the alias I think.
Re:Using GNU Stow to manage your dotfiles (2012) by politelemon on Wednesday July 27, 2022 @01:13PM (#32253238)
Thanks for sharing that. Question, where do you normally push the "repo" to?
Re:Using GNU Stow to manage your dotfiles (2012) by 5e92cb50239222b on Wednesday July 27, 2022 @01:23PM (#32253395)
Doesn't matter in my case, there are no secrets there (so I use a public git forge). If this doesn't work for you, you can just push to any old server via ssh:

  $ git remote add foobar address:path/relative/to/home/dir
  $ git push foobar
, or self-host Gitea with registration closed if you want a proper forge.
Re:Using GNU Stow to manage your dotfiles (2012) by bryankaplan on Wednesday July 27, 2022 @01:17PM (#32253306)
I'm not the person you asked, but it's trivial to host your own git repos on a server.
Re:Using GNU Stow to manage your dotfiles (2012) by lvass on Wednesday July 27, 2022 @01:13PM (#32253239)
>if you run `git status`

Is this a problem if you gitignore * (whitelisting)?

Re:Using GNU Stow to manage your dotfiles (2012) by 5e92cb50239222b on Wednesday July 27, 2022 @01:18PM (#32253324)
I used this initially (before running into the link above), but it still requires using a 'global' git repository which had its share of issues (some build scripts didn't like it, for example).