Remove git submodule created by mistake

  1. Make sure that the sub-directory/sub-module doesn't have .git directory. If it does, delete the .git directory inside the sub-directory/sub-module
    rm -rf [sub-module]/.git

  2. Clear the git cache
    git rm --cached [sub-module]


Thursday, May 20, 2021 - 11:37

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.