Created
December 2, 2020 21:29
-
-
Save jaysephjw/516e43a5ab6c2549e907415d1d6c3898 to your computer and use it in GitHub Desktop.
(WIP) - Find all submodules that ref a commit not on origin/master
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
git config --file .gitmodules --get-regexp path | awk '{ print $2 }' | xargs -I{} bash -c '[[ $(git -C {} --no-pager branch -r --contains HEAD) != *origin/master* ]] || echo "{} NOT OK"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rough idea for using as a pre-commit hook: