Next to that, on Windows the file permissions for running scripts and executables do not matter that much as windows simply can execute whatever is readable but that is of course different on Linux or *nix like systems where file permissions are needed to be able to execute scripts, like bash scripts (*.sh).

In our git repositories we are also maintaining the bash scripts for dockerizing builds that run in Jenkins and unfortunately, copying over a script to another git repo on a windows machine suddenly might give the script different permissions. Resulting in the script failing with a nasty execute permission error within Jenkins. That is, the script might not be having the execute permissions.

What to do is to add the execute permission to the script. But how to do that on windows?