Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save realeroberto/69a484740ce66f494aa4ecf991df5ec3 to your computer and use it in GitHub Desktop.
Save realeroberto/69a484740ce66f494aa4ecf991df5ec3 to your computer and use it in GitHub Desktop.
Remove unnecessary executable bit from a Git repository
# the order of the two statements is crucial (of course)
find \( -path ./.git -prune -false -o -executable \) -a -type f -exec git update-index --chmod=-x {} \;
find \( -path ./.git -prune -false -o -executable \) -a -type f -exec chmod -x \{} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment