This file contains 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 | |
# Revert `git submodule absorbgitdirs`. | |
# Source: https://stackoverflow.com/a/51763718 | |
# Notes: | |
# - Nested submodules must be moved first, so if you are specifying submodules manually, make sure the dependencies are correct | |
# - Assuming latest version of Git and GNU coreutils has been installed in the $PATH | |
gitextractsubmodules() { | |
set -e | |
pushd -- "$(git rev-parse --show-superproject-working-tree)" >/dev/null 2>&1 |