* git submodule delete?
@ 2012-05-10 0:34 Rich Pixley
2012-05-10 6:56 ` Thomas Hager
2012-05-10 16:53 ` Heiko Voigt
0 siblings, 2 replies; 3+ messages in thread
From: Rich Pixley @ 2012-05-10 0:34 UTC (permalink / raw)
To: git@vger.kernel.org
How do I remove a submodule?
Put another way, I've made a commit pointing to a nonexistent submodule
commit. And the submodule commit is now lost. Can I manually force the
submodule commit to the previous value? Or can I remove the submodule
and re-add it with an existing value?
--rich
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git submodule delete?
2012-05-10 0:34 git submodule delete? Rich Pixley
@ 2012-05-10 6:56 ` Thomas Hager
2012-05-10 16:53 ` Heiko Voigt
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Hager @ 2012-05-10 6:56 UTC (permalink / raw)
To: git@vger.kernel.org
Quoting "Rich Pixley" <rich.pixley@palm.com>:
> How do I remove a submodule?
got to your superproject and:
- delete the submodules's section in .gitmodules and .git/config
- run "git rm --cached path_to_submodule"
- commit the superproject
- remove the submodule files.
- remove .git/modules/your_submodule
hth,
tom.
--
Thomas "Duke" Hager duke@sigsegv.at
GPG: 2048R/791C5EB1 http://www.sigsegv.at/gpg/duke.gpg
=================================================================
"Never Underestimate the Power of Stupid People in Large Groups."
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git submodule delete?
2012-05-10 0:34 git submodule delete? Rich Pixley
2012-05-10 6:56 ` Thomas Hager
@ 2012-05-10 16:53 ` Heiko Voigt
1 sibling, 0 replies; 3+ messages in thread
From: Heiko Voigt @ 2012-05-10 16:53 UTC (permalink / raw)
To: Rich Pixley; +Cc: git@vger.kernel.org
On Wed, May 09, 2012 at 05:34:58PM -0700, Rich Pixley wrote:
> Put another way, I've made a commit pointing to a nonexistent submodule
> commit. And the submodule commit is now lost. Can I manually force the
> submodule commit to the previous value? Or can I remove the submodule
> and re-add it with an existing value?
If want to create a new commit with a valid submodule sha1 then you can
simply checkout the submodule at the desired commit and commit that
change in the superproject.
As far as changing the existing commit is concerned. That is not
possible wihout rewriting history. If your commit is on a branch
which nobody else is using you can use rebase to modify that commit.
If it is on a shared branch its not easy since everybody will notice and
would have to reset to the new history which will be a hassle.
Cheers Heiko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-10 16:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-10 0:34 git submodule delete? Rich Pixley
2012-05-10 6:56 ` Thomas Hager
2012-05-10 16:53 ` Heiko Voigt
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).