Last active
January 25, 2021 09:28
-
-
Save josepsmartinez/15f465197a47522893727d47623a3224 to your computer and use it in GitHub Desktop.
Remove git submodule (from https://gist.github.com/shahha @ https://gist.github.com/myusuf3/7f645819ded92bda6677)
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
# arguments | |
$PATH_TO_SUBMODULE=$2 | |
shift | |
$COMMIT_MESSAGE="$@" | |
# removal | |
git submodule deinit $PATH_TO_SUBMODULE | |
git rm $PATH_TO_SUBMODULE | |
git commit -m $COMMIT_MSG | |
rm -rf .git/modules/$PATH_TO_SUBMODULE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment