Assume I have local workstation with root access and a server without root access. I want to share (mostly configuration) files between these two computers. So I set up a git repository with top-level in my home directory and add these files. So far so good.
Further assume that there exists a file that I need on both computers. It comes with the package manager and as such will be installed outside my home directory. It is not installed on the server and it won't be installed on the server. I now have two options:
I install it with the package manager locally and install it on the remote server by hand. This way the files are not in sync. That's somewhat okay, since the file comes from the package manager, it's not really a file I'm working on. However, I always need to install it separately when moving to a new server, and this happens frequently. I could add a shell script that installs the package and add this shell script to the git repository, though.
I install it locally in my home directory and add it to the repository. This way I don't have to install it separately on different machines, it is kept in sync, but it is not updated anymore through the package manager. That's what I'm doing right now.
And here's the question: Is there a third - better - way how to do this? any
git symbolic link magic?