Skip to content

Instantly share code, notes, and snippets.

@josepsmartinez
Last active January 25, 2021 09:28
Show Gist options
  • Save josepsmartinez/15f465197a47522893727d47623a3224 to your computer and use it in GitHub Desktop.
Save josepsmartinez/15f465197a47522893727d47623a3224 to your computer and use it in GitHub Desktop.
# 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