git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git submodule remove?
@ 2009-07-08 19:41 Tim Henigan
  2009-07-08 21:54 ` Raman Gupta
  2009-07-11  5:27 ` Tim Harper
  0 siblings, 2 replies; 4+ messages in thread
From: Tim Henigan @ 2009-07-08 19:41 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 4+ messages in thread
* git submodule remove?
@ 2008-03-31 18:58 Asheesh Laroia
  0 siblings, 0 replies; 4+ messages in thread
From: Asheesh Laroia @ 2008-03-31 18:58 UTC (permalink / raw)
  To: git

I notice that in git-submodule, there is an "add", a "status", an 
"init", and an "update" command, but no "remove" command.

I have "git version 1.5.4.4", and man git-submodule provides no mention of 
the right way to remove a submodule.  I imagine that removing it from 
.gitmodules and rm -rf'ing the tree that git-submodule cloned should do 
the trick. Is this documented somewhere?

-- Asheesh.

-- 
Editing is a rewording activity.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-11  5:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-08 19:41 git submodule remove? Tim Henigan
2009-07-08 21:54 ` Raman Gupta
2009-07-11  5:27 ` Tim Harper
  -- strict thread matches above, loose matches on Subject: below --
2008-03-31 18:58 Asheesh Laroia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).