{"thread":{"id":"30489","subject":"git submodule delete?","startedAt":"2012-05-10T00:34:58Z","lastAt":"2012-05-10T16:53:11Z","messageCount":3,"participants":["Rich Pixley","Thomas Hager","Heiko Voigt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"191256","messageId":"4FAB0D32.3000503@palm.com","threadId":"30489","inReplyTo":null,"subject":"git submodule delete?","fromName":"Rich Pixley","fromEmail":"rich.pixley@palm.com","sentAt":"2012-05-10T00:34:58Z","receivedAt":"2012-05-10T00:34:58Z","isPatch":false,"sender":{"key":"rich.pixley@palm.com","avatar":null},"body":"How do I remove a submodule?\n\nPut another way, I've made a commit pointing to a nonexistent submodule \ncommit.  And the submodule commit is now lost.  Can I manually force the \nsubmodule commit to the previous value?  Or can I remove the submodule \nand re-add it with an existing value?\n\n--rich\n"},{"id":"191275","messageId":"20120510085616.138349f77tk1gplc@webmail.moger.at","threadId":"30489","inReplyTo":"4FAB0D32.3000503@palm.com","subject":"Re: git submodule delete?","fromName":"Thomas Hager","fromEmail":"duke@sigsegv.at","sentAt":"2012-05-10T06:56:16Z","receivedAt":"2012-05-10T06:56:16Z","isPatch":false,"sender":{"key":"duke@sigsegv.at","avatar":null},"body":"Quoting \"Rich Pixley\" <rich.pixley@palm.com>:\n> How do I remove a submodule?\ngot to your superproject and:\n\n- delete the submodules's section in .gitmodules and .git/config\n- run \"git rm --cached path_to_submodule\"\n- commit the superproject\n- remove the submodule files.\n- remove .git/modules/your_submodule\n\nhth,\ntom.\n\n-- \nThomas \"Duke\" Hager                               duke@sigsegv.at\nGPG: 2048R/791C5EB1            http://www.sigsegv.at/gpg/duke.gpg\n=================================================================\n\"Never Underestimate the Power of Stupid People in Large Groups.\"\n"},{"id":"191323","messageId":"20120510165311.GB76400@book.hvoigt.net","threadId":"30489","inReplyTo":"4FAB0D32.3000503@palm.com","subject":"Re: git submodule delete?","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2012-05-10T16:53:11Z","receivedAt":"2012-05-10T16:53:11Z","isPatch":false,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"On Wed, May 09, 2012 at 05:34:58PM -0700, Rich Pixley wrote:\n> Put another way, I've made a commit pointing to a nonexistent submodule  \n> commit.  And the submodule commit is now lost.  Can I manually force the  \n> submodule commit to the previous value?  Or can I remove the submodule  \n> and re-add it with an existing value?\n\nIf want to create a new commit with a valid submodule sha1 then you can\nsimply checkout the submodule at the desired commit and commit that\nchange in the superproject.\n\nAs far as changing the existing commit is concerned. That is not\npossible wihout rewriting history. If your commit is on a branch\nwhich nobody else is using you can use rebase to modify that commit.\n\nIf it is on a shared branch its not easy since everybody will notice and\nwould have to reset to the new history which will be a hassle.\n\nCheers Heiko\n"}]}