git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Manually edit the commit a submodule is pointing to?
@ 2010-04-12 14:31 Tim Visher
  2010-04-12 14:47 ` Shawn O. Pearce
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Visher @ 2010-04-12 14:31 UTC (permalink / raw)
  To: Git Mailing List

Hello Everyone,

I recently began to use submodules to manage large packages that I
depend on from my .emacs file and I've run into an issue where I made
a change locally and didn't push out to the master repo.  I'm now not
at that box and I'm trying to checkout the repo fresh.

The problem is that the master repo doesn't have the commit specified…
Where?  So I can't edit the submodule commit and then readd it because
I don't have the submodule to edit since I can't check it out.  Is it
possible to just manually munge the commit that the submodule is
pointing to?

Thanks!

-- 

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail

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

* Re: Manually edit the commit a submodule is pointing to?
  2010-04-12 14:31 Manually edit the commit a submodule is pointing to? Tim Visher
@ 2010-04-12 14:47 ` Shawn O. Pearce
  2010-04-12 18:19   ` Tim Visher
  0 siblings, 1 reply; 3+ messages in thread
From: Shawn O. Pearce @ 2010-04-12 14:47 UTC (permalink / raw)
  To: Tim Visher; +Cc: Git Mailing List

Tim Visher <tim.visher@gmail.com> wrote:
> I recently began to use submodules to manage large packages that I
> depend on from my .emacs file and I've run into an issue where I made
> a change locally and didn't push out to the master repo.  I'm now not
> at that box and I'm trying to checkout the repo fresh.
> 
> The problem is that the master repo doesn't have the commit specified…
> Where?  So I can't edit the submodule commit and then readd it because
> I don't have the submodule to edit since I can't check it out.  Is it
> possible to just manually munge the commit that the submodule is
> pointing to?

Yup:

  git update-index --cacheinfo 160000 commit path

-- 
Shawn.

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

* Re: Manually edit the commit a submodule is pointing to?
  2010-04-12 14:47 ` Shawn O. Pearce
@ 2010-04-12 18:19   ` Tim Visher
  0 siblings, 0 replies; 3+ messages in thread
From: Tim Visher @ 2010-04-12 18:19 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: Git Mailing List

On Mon, Apr 12, 2010 at 10:47 AM, Shawn O. Pearce <spearce@spearce.org> wrote:
> Tim Visher <tim.visher@gmail.com> wrote:
>> I recently began to use submodules to manage large packages that I
>> depend on from my .emacs file and I've run into an issue where I made
>> a change locally and didn't push out to the master repo.  I'm now not
>> at that box and I'm trying to checkout the repo fresh.
>>
>> The problem is that the master repo doesn't have the commit specified…
>> Where?  So I can't edit the submodule commit and then readd it because
>> I don't have the submodule to edit since I can't check it out.  Is it
>> possible to just manually munge the commit that the submodule is
>> pointing to?
>
> Yup:
>
>  git update-index --cacheinfo 160000 commit path

Thanks, Shawn.  That worked great.

-- 

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail

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

end of thread, other threads:[~2010-04-12 18:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-12 14:31 Manually edit the commit a submodule is pointing to? Tim Visher
2010-04-12 14:47 ` Shawn O. Pearce
2010-04-12 18:19   ` Tim Visher

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).