git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git submodule remove

From
Matheus Tavares <matheus.bernardino@usp.br>
Date
Oct 21, 2021, 23:25 UTC
Message-ID
<CAHd-oW5PfygyNsRWGg4_W2pxR_HbePvguKRf-bK9RtY3cuAX9g@mail.gmail.com>
In-Reply-To
<xmqqbl3ihu6l.fsf@gitster.g>
On Thu, Oct 21, 2021 at 7:47 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
>
> "brian m. carlson" <sandals@crustytoothpaste.net> writes:
>
> > On 2021-10-21 at 17:25:38, Kalyan Sriram wrote:
> >> Hello,
> >>
> >> I was curious why git-submodule does not have an `rm` command. Currently
> >> I have to manually delete it from .gitmodules, .git/config,
> >> .git/modules/, etc. See [0].
> >>
[...]
Show 9 quoted lines
> I'd imagine that the happy-case implementation should be fairly
> straight-forward.  You would:
>
>  - ensure that the submodule is "absorbed" already;
>
>  - run "git rm -f" the submodule to remove the gitlink from the index
>    and remove the directory from the working tree; and
>
>  - remove the .gitmodules entry for the submodule.
I think "git rm <submodule>" already does these three steps, doesn't it?
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 15 in “Git submodule remove”
  1. Kalyan SriramOct 21, 2021
  2. brian m. carlsonOct 21, 2021
  3. Junio C HamanoOct 21, 2021
  4. Matheus TavaresOct 21, 2021
  5. Junio C HamanoOct 21, 2021
  6. Kalyan SriramOct 22, 2021
  7. Junio C HamanoOct 22, 2021
  8. Kalyan SriramOct 24, 2021
  9. Junio C HamanoOct 24, 2021
  10. Ævar Arnfjörð BjarmasonOct 22, 2021
  11. Junio C HamanoOct 22, 2021
  12. Randall S. BeckerOct 22, 2021
  13. Kalyan SriramOct 22, 2021
  14. Randall S. BeckerOct 22, 2021
  15. Junio C HamanoOct 22, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.