git add access rights for script

C++
git update-index --chmod=+x foo.shgit config core.fileMode false

Source

Also in C++: