Skip to content

Instantly share code, notes, and snippets.

@pherrymason
Created January 14, 2014 16:13
Show Gist options
  • Save pherrymason/8420865 to your computer and use it in GitHub Desktop.
Save pherrymason/8420865 to your computer and use it in GitHub Desktop.
Fully remove Git Submodule

To remove submodule completely, perform following steps.

  1. remove this lines in .git/config [submodule ".vim/bundle/vimproc"] url = https://github.com/Shougo/vimproc.vim.git

  2. remove this lines in .gitmodules [submodule ".vim/bundle/vimproc"] path = .vim/bundle/vimproc url = https://github.com/Shougo/vimproc.vim.git

  3. remove submodule directory rm -rf .vim/bundle/vimproc

  4. unstage submodule git rm --cached .vim/bundle/vimproc

  5. remove submodule directory in .git/modules rm -rf .git/modules/.vim/bundle/vimproc

finally readd submodule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment