Our workflow is develop on a local machine, commit the changes to a central repository, then check out the branch of that repository that we need.
The problem is tha
For me, the best solution was creation of a shell script that fixes the permissions. For example:
.git/hooks/post-checkout:
#!/bin/sh
chmod +x tools/*
Btw, checkout is not the only case when git does mess with permissions, it's also when you pull. I handle that with .git/hooks/post-merge hook.
Ideally, you can create a shell script that fixes permissions somewhere in your repo (e.g. tools/fixpermissions.sh), and call it in both hooks. Don't forget to change the permissions for that file manually ;)
#!/bin/sh
chmod a+x tools/fixpermissions.sh
tools/fixpermissions.sh