git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Manually edit the commit a submodule is pointing to?

From
Tim Visher <tim.visher@gmail.com>
Date
Apr 12, 2010, 18:19 UTC
Message-ID
<g2yc115fd3c1004121119l404caf8coa376d7561f130a3b@mail.gmail.com>
In-Reply-To
<20100412144718.GC6313@spearce.org>
On Mon, Apr 12, 2010 at 10:47 AM, Shawn O. Pearce <spearce@spearce.org> wrote:
Show 15 quoted lines
> 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
Previous: Shawn O. Pearce
Message 3 of 3 in “Manually edit the commit a submodule is pointing to?”
  1. Tim VisherApr 12, 2010
  2. Shawn O. PearceApr 12, 2010
  3. Tim VisherApr 12, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.