This question already has an answer here:
I would like to keep my .bashrc file in a gitlab repo, for obvious reasons. However, it sits in my home directory. Initialising a git repo in my home repo seems unweildly, as it then looks at everything "below" it in the tree (to my understanding).
While I understand that I can simply not add these files to git tracking, I don't want to accidentaly "git add *" out of habit and then try and push my whole directory tree to gitlab's servers.
Is there a way to point my .bashrc (and .vimrc, etc) at a subdirectory or somesuch?