@sir That's... a much better way of doing it than I tried. I made a separate repo that was out of the way, then made an install script that would make symlinks for all the files I wanted.
That combined with a branch for each different machine just made it all a bit of a mess really. I should clean it all up at some point.
@OTheB that's similar to what I originally did, it was a mess
@sir I've found using vcsh quite convenient, as it allows having multiple git repositories in ~/ but obviously it's more complicated than a single repo.
@sir i don't understand why you need the gitignore file, I get by without it and never had problems, moreover - when i issue `git status` it shows me files that i staged to commit, modified tracked files, AND the list of new untracked files, so when i feel the need to commit I skim through that list and check if i don't forget to include any of the new files. very handy
@sir also, no need for the -f flag that way
@sir I have a similar setup but I put the .git directory in ~/.dotfiles instead of ~.
I then use this alias to interact with my git repository: `alias dgit='git --git-dir ~/.dotfiles/.git --work-tree=$HOME'
This was the only way I found worked well with all search tools (eg: ripgrep, ack). Otherwise I had problems where these tools would skip files due to gitignore.
This isnt my original idea though, took it from https://www.electricmonk.nl/log/2015/06/22/keep-your-home-dir-in-git-with-a-detached-working-directory/
In addition to the alias for one's public dotfiles, I have another repo/alias for private stuff too, so the two basically just overlay my $HOME.
Having these two aliases is quite advantageous, I think. It also avoids undesirable habitual commits to my dotfiles, when I think I'm in an "actual" git directory.
@sir I hadn't thought of just using ~/ as a repo, that's interesting. I keep mine in a directory and install with a script that manages all the symlinks: https://github.com/zacanger/dotfiles/blob/master/bin/new-linux.sh which has worked out pretty well for the past year or two
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!