Skip to content

Instantly share code, notes, and snippets.

View Riches's full-sized avatar

Will Riches Riches

View GitHub Profile
@lelegard
lelegard / git-set-exec.md
Created December 7, 2021 08:32
Git on Windows: setting executable permission on a script

Git on Windows: setting executable permission on a script

The problem: Create a script (shell, python, whatever) on Windows, add it to a git repository. Then clone or pull the repo on a UNIX system (Linux, macOS). The file won't get the executable permission.

If the script had been created from the beginning on a UNIX system with executable permission, this permission would have been propagated to the repo. However, on Windows, this type of permission does not exist and cannot be set at system level.