I have a repository with a backup of various config files. I would like the repo to contain only symlinks to the real config files (which are outside of the repository), so that I don't need to manually copy the config to repo in case of any changes.
When I tried to push symlink, the file was naturally unreadable in git or on other filesystem. Is there any way to force git to always follow the link and push original file, or is there any other approach?
I can think of two solutions:
Put the configuration file in your Git repository and make a symlink to that file as the actual configuration used.
If the Git repository is in the same file system as the configuration location, instead of ln -s
, use ln
to make a hard link so that the configuration used and the Git working directory file refer to the same file.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments