You could use aliases on your .bashrc for git (and a bare repo), that would let you manage your $HOME and /etc directly with git without using symlinks, only downside is having them separated in two aliases and two repos.
# user config repo
alias dotfiles='git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
# system config repo
alias etcfiles='sudo git --git-dir=$HOME/.etcfiles --work-tree=/etc'
It is also recommended that you run:
<alias> config --local status.showUntrackedFiles no
in the terminal for both the dotfiles and etcfiles aliases (you can pick the aliases and git-dir names you want)
The aliases help you have a custom named folder instead of .git located in a custom path, and you can manage them without symlinks as you use git directly on the file’s original location, this would solve your issue of other solutions that depend on symlinks
Note: you could technically have the root directory --work-tree=/ as a work tree to use only one command, but It is not recommended to give git the possibility to rewrite any file on the entire file system.
Some reference links:




A friendly reminder that it is best to wait a bit before updating, in case there are any bugs still there, happened a few days ago with Forgejo, that a mayor bug was detected after initial release of v13.0