Created
October 9, 2020 02:12
-
-
Save phette23/5bc330309c7fa2e835dfeecef449e929 to your computer and use it in GitHub Desktop.
fix files modes in Drive git repos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/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