asoftwareguy.com - A Software Guy's Blog

Example domain paragraphs

Occasionally, files get committed to source control having the wrong file permissions. Either they don’t have execute when they should, or they have execute when they shouldn’t, just for example. I came across this a couple of weeks ago and came up with the following solution. It changes the file permissions recursively on files and also does the same to the Git index. Please refer to the Git documentation for config.fileMode for more information on why this might happen.