@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 electricmonk.nl/log/2015/06/22

Follow

@tomleb @sir I'm doing this as well. Together with Drew's multi host, multi arch, single repo.

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.

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml