Created
December 18, 2024 04:39
-
-
Save brunos3d/b0afcc596a3367d1fdbc6ab6830d612f to your computer and use it in GitHub Desktop.
This script recursively find git repos from the current folder and revert all files with permission changes
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
find . -type d -name ".git" -exec sh -c 'repo_dir=$(dirname "{}"); echo "Processando repositório: $repo_dir"; cd "$repo_dir" && [ -d .git ] && git diff -p -R --no-ext-diff --no-color --diff-filter=M | grep -E "^(diff|(old|new) mode)" --color=never | git apply' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment