{"thread":{"id":"23429","subject":"Manually edit the commit a submodule is pointing to?","startedAt":"2010-04-12T14:31:57Z","lastAt":"2010-04-12T18:19:15Z","messageCount":3,"participants":["Tim Visher","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"139338","messageId":"i2jc115fd3c1004120731g950c127fn44603df222de8273@mail.gmail.com","threadId":"23429","inReplyTo":null,"subject":"Manually edit the commit a submodule is pointing to?","fromName":"Tim Visher","fromEmail":"tim.visher@gmail.com","sentAt":"2010-04-12T14:31:57Z","receivedAt":"2010-04-12T14:31:57Z","isPatch":false,"sender":{"key":"tim.visher@gmail.com","avatar":"https://gravatar.com/avatar/98307ce54bcac1a46b5d845827d5386e2a27895ff08790cdd3877ad527760575?d=mp&s=160"},"body":"Hello Everyone,\n\nI recently began to use submodules to manage large packages that I\ndepend on from my .emacs file and I've run into an issue where I made\na change locally and didn't push out to the master repo.  I'm now not\nat that box and I'm trying to checkout the repo fresh.\n\nThe problem is that the master repo doesn't have the commit specified…\nWhere?  So I can't edit the submodule commit and then readd it because\nI don't have the submodule to edit since I can't check it out.  Is it\npossible to just manually munge the commit that the submodule is\npointing to?\n\nThanks!\n\n-- \n\nIn Christ,\n\nTimmy V.\n\nhttp://burningones.com/\nhttp://five.sentenc.es/ - Spend less time on e-mail\n"},{"id":"139340","messageId":"20100412144718.GC6313@spearce.org","threadId":"23429","inReplyTo":"i2jc115fd3c1004120731g950c127fn44603df222de8273@mail.gmail.com","subject":"Re: Manually edit the commit a submodule is pointing to?","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2010-04-12T14:47:18Z","receivedAt":"2010-04-12T14:47:18Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Tim Visher <tim.visher@gmail.com> wrote:\n> I recently began to use submodules to manage large packages that I\n> depend on from my .emacs file and I've run into an issue where I made\n> a change locally and didn't push out to the master repo.  I'm now not\n> at that box and I'm trying to checkout the repo fresh.\n> \n> The problem is that the master repo doesn't have the commit specified…\n> Where?  So I can't edit the submodule commit and then readd it because\n> I don't have the submodule to edit since I can't check it out.  Is it\n> possible to just manually munge the commit that the submodule is\n> pointing to?\n\nYup:\n\n  git update-index --cacheinfo 160000 commit path\n\n-- \nShawn.\n"},{"id":"139367","messageId":"g2yc115fd3c1004121119l404caf8coa376d7561f130a3b@mail.gmail.com","threadId":"23429","inReplyTo":"20100412144718.GC6313@spearce.org","subject":"Re: Manually edit the commit a submodule is pointing to?","fromName":"Tim Visher","fromEmail":"tim.visher@gmail.com","sentAt":"2010-04-12T18:19:15Z","receivedAt":"2010-04-12T18:19:15Z","isPatch":false,"sender":{"key":"tim.visher@gmail.com","avatar":"https://gravatar.com/avatar/98307ce54bcac1a46b5d845827d5386e2a27895ff08790cdd3877ad527760575?d=mp&s=160"},"body":"On Mon, Apr 12, 2010 at 10:47 AM, Shawn O. Pearce <spearce@spearce.org> wrote:\n> Tim Visher <tim.visher@gmail.com> wrote:\n>> I recently began to use submodules to manage large packages that I\n>> depend on from my .emacs file and I've run into an issue where I made\n>> a change locally and didn't push out to the master repo.  I'm now not\n>> at that box and I'm trying to checkout the repo fresh.\n>>\n>> The problem is that the master repo doesn't have the commit specified…\n>> Where?  So I can't edit the submodule commit and then readd it because\n>> I don't have the submodule to edit since I can't check it out.  Is it\n>> possible to just manually munge the commit that the submodule is\n>> pointing to?\n>\n> Yup:\n>\n>  git update-index --cacheinfo 160000 commit path\n\nThanks, Shawn.  That worked great.\n\n-- \n\nIn Christ,\n\nTimmy V.\n\nhttp://burningones.com/\nhttp://five.sentenc.es/ - Spend less time on e-mail\n"}]}