Skip to content

Instantly share code, notes, and snippets.

@MayerDaniel
Created March 8, 2024 17:37
Show Gist options
  • Select an option

  • Save MayerDaniel/3df69a1b7643c00c9e0d85d81e66e427 to your computer and use it in GitHub Desktop.

Select an option

Save MayerDaniel/3df69a1b7643c00c9e0d85d81e66e427 to your computer and use it in GitHub Desktop.

Revisions

  1. MayerDaniel created this gist Mar 8, 2024.
    6 changes: 6 additions & 0 deletions submodule_rm.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    git rm --cached submodule_path # delete reference to submodule HEAD (no trailing slash)
    git rm .gitmodules # if you have more than one submodules,
    # you need to edit this file instead of deleting!
    rm -rf submodule_path/.git # make sure you have backup!!
    git add submodule_path # will add files instead of commit reference
    git commit -m "remove submodule"