Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
fix files modes in Drive git repos
#/usr/bin/env bash
# Google Drive messes up file modes by setting everything to 644 so all your executables are screwed up
# I store a bunch of git repos in a Drive folder (don't ask why) & this fixes the file modes by just checking out everything
for dir in $(ls -d */); do
cd ${dir}
git status 2&>/dev/null && git checkout -- .
cd -
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment