On my mac at the root I have my .bashrc, .aliases, .zshrc..., then in another folder down the way I have a git repository of the same dotfiles. When I update the ones at the root, I update the git repo as well (manually). Is there some way to 'link' the dot files that are actually implemented at the root folder to the git repo so I only have to deal with one change?
What about symbolic link?
Just delete the file in your root, and recreate them as
ln -s /physical/path/to/file /symbolic/link/path
For example, if you have the file /git/.aliases, ln -s /git/.aliases /root/.aliases will create a symbolic link called .aliases in the root folder. From this point on, whichever file you modify (/git or /root) will modify the other one as well.
Have a look at this link for more details on symbolic links and Mac.
Please, forgive me for the random paths, I am not a Mac users.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With