# Suggestion: git submodule remove

2 messages from 2015-04-10 to 2015-04-11. Participants: Konrád Lőrinczi, Jens Lehmann.
Thread: https://gitlist.dev/t/39044

## Konrád Lőrinczi, 2015-04-10 11:33

Subject: Suggestion: git submodule remove
Message-ID: <CABEDGg8Gos8UTi2U_xgMpx2dJtbtSNCCd2gRr_KR1qESB6gYYA@mail.gmail.com>
URL: https://gitlist.dev/e/CABEDGg8Gos8UTi2U_xgMpx2dJtbtSNCCd2gRr_KR1qESB6gYYA%40mail.gmail.com

```
Hi GIT devs,

I really miss the
  git submodule remove
command.

This should be handle all the tasks what are needed to remove a submodule.
    - Delete the relevant line from the .gitmodules file.
    - Delete the relevant section from .git/config.
    - Run git rm --cached path_to_submodule (no trailing slash).
    - Delete the now untracked submodule files.

These tasks should be handled automatically.
Currently you can only remove a submodule manually, no way to do it
automatically with one command.
"Removing submodules" and "unsubmodule a submodule" are still a pain
to do in GIT, even in v2.3.5.


Please consider implementing the "git submodule remove" command.


Thanks,
Konrad Lorinczi

```

## Jens Lehmann, 2015-04-11 12:15

Subject: Re: Suggestion: git submodule remove
Message-ID: <5529106D.7050301@web.de>
URL: https://gitlist.dev/e/5529106D.7050301%40web.de
In-Reply-To: <CABEDGg8Gos8UTi2U_xgMpx2dJtbtSNCCd2gRr_KR1qESB6gYYA@mail.gmail.com>

```
Am 10.04.2015 um 13:33 schrieb Konrád Lőrinczi:
> I really miss the
>    git submodule remove
> command.
>
> This should be handle all the tasks what are needed to remove a submodule.
>      - Delete the relevant line from the .gitmodules file.
>      - Delete the relevant section from .git/config.
>      - Run git rm --cached path_to_submodule (no trailing slash).
>      - Delete the now untracked submodule files.
>
> These tasks should be handled automatically.
> Currently you can only remove a submodule manually, no way to do it
> automatically with one command.
> "Removing submodules" and "unsubmodule a submodule" are still a pain
> to do in GIT, even in v2.3.5.

"git rm <submodule-path>" will remove a submodule from .gitmodules,
the index and the work tree (but not from .git/config, that's what
"git submodule deinit" is for).

```
