git submodule remove?

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

 



Hello,

I recently encountered a situation where a user wanted to remove a submodule
from a repository.  Searching the mail archive, I found this thread
[1], but it does
not appear that it was ever followed up.

The Git Submodule Tutorial [2] has instructions for removing submodules, but it
seems natural to teach git how to "submodule rm".

This change would require git-submodule.sh to:
    1. Modify the .gitmodules file (remove the entry for the submodule).
    2. Modify the .git/config file (remove the entry for the submodule).
    3. Delete the newly untracked files.

Another option to consider would be a "submodule rm --cached" option which would
keep the newly untracked files.  However, with this option, I believe
it should still
descend into the submodule directory to remove the leftover submodule
".git" folder.

Is there another way of doing this?  If not, does this sound like a
reasonable change?

Thanks,
Tim Henigan

[1] http://article.gmane.org/gmane.comp.version-control.git/101610/match=submodule+remove
[2] http://git.or.cz/gitwiki/GitSubmoduleTutorial
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]