Re: Git submodule remove

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matheus Tavares <matheus.bernardino@xxxxxx> writes:

> On Thu, Oct 21, 2021 at 7:47 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>>
>> "brian m. carlson" <sandals@xxxxxxxxxxxxxxxxxxxx> 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].
>> >>
> [...]
>> 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?

Wow, that is a unnerving layering violation, but I suspect it is too
late to fix it. So perhaps "git submodule rm" would just become a
synonym for "git rm"?

Thanks.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux