I'm unsure of whether or not pushing symbolic links to a git repo is a bad practice or not. Is there any risk or bad reason to do so?
I haven't seen a good answer. If anyone has a good resource or explanation please share.
I'm unsure of whether or not pushing symbolic links to a git repo is a bad practice or not. Is there any risk or bad reason to do so?
I haven't seen a good answer. If anyone has a good resource or explanation please share.
As long as the symlink references a resource within the same repository, as a relative path, it should be OK (especially now that symlinks are supported on Windows, and no longer require privilege elevation)
The following two cases would not work though, when that same symlink references a resource:
"bad practice" because :Any clone of the repository in a different machine/patform/OS would not be able to access/use those paths.
After that, it depends where the repo (with its symlink) is used.
I mentioned before in "How to add symlink file to a gitlab repo" that a symlink would make a GitLab pipeline fail.
=> "bad practice": the environment where such a repository would be used would fail to run its content.
.gitmodules
file): it is a perfectly acceptable good practice. –
Curve We had arrangements with symlinks in github repositories and from my perspective it is a bad practice:
I guess there are other factors as well, but this is what I encountered.
© 2022 - 2024 — McMap. All rights reserved.