Today I Learned

Add executable flags in git file

There is support in the git add command to make a file tracked in your git repository executable. For example, let's say you added a script to your repo but forgot to add the executable bit to its file permissions. You can now do this:

git add --chmod=+x

One gotcha of this approach is that this will only change the permissions tracked by git, but not the actual permissions of the file on YOUR filesystem. You will still need to run chmod +x to modify your local permissions. However, your teammates should be able to pick up the permission changes from a git pull.

Courtesy of