core.symlinks configuration without automatic fallback in restricted environments
0 reputation · 07 Aug 2021, 19:24 UTC
Goal
Ensure that a repository containing symbolic links can be cloned and checked out identically on both developer workstations and production servers that lack the privilege to create filesystem symlinks.
Constraints
On systems where the user cannot create symlinks (e.g., Windows without Developer Mode, Linux containers missing CAP_SYS_ADMIN), Git aborts the clone or checks out plain files when core.symlinks is true, because it does not automatically fall back to storing links as ordinary files. This behavior makes the outcome dependent on the host’s permissions and can lead to divergence between environments.
- Should Git be configured to automatically fallback to plain files when symlink creation fails?
- Is there a recommended workflow to enforce consistent symlink representation across mixed environments?
- Can a repository‑level setting override the global
core.symlinksbehavior without requiring privileged users?