{"thread":{"id":"9466","subject":"How to work with submodule?","startedAt":"2007-08-10T07:02:00Z","lastAt":"2007-08-10T07:29:31Z","messageCount":2,"participants":["Steffen Prohaska"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"50382","messageId":"769ABF7E-14C9-43D1-B879-138B6FF96B2E@zib.de","threadId":"9466","inReplyTo":null,"subject":"How to work with submodule?","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-08-10T07:02:00Z","receivedAt":"2007-08-10T07:02:00Z","isPatch":false,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"I tried to do some work on msysgit, but instead I'm fighting\nwith submodule for a while now. Maybe I haven't understood\nsomething, but for submodule makes git nearly unusable.\nHere is what I did.\n\nmsysgit ist organized in the following way.\n\n/.git (clone of repo.or.cz/msysgit.git)\n/git/.git (clone of repo.or.cz/git/mingw/4msysgit.git)\n\nThat is the root of the project is msysgit and as a submodule\ngit is included. Working on the submodule is fine.\n\nBut it I start to work on msysgit itself I get lost.\n\nI have some changes in the submodule and just want to commit\nsome changes in the root, rebase to origin/master and push\nto mob. To make it a bit harder I have some local changes\nin the working tree.\n\nThis sounds quite simple, but I'm fighting with submodule\nfor quite some while now.\n\nI think the root of all trouble is that I changed something\nin the submodule git and now would like to change few things\nin the root. I have a modified submodule and this messes\nup everything.\n\nI can't stash, I can't rebase.\n\nI tried to commit the head of the submodule (btw, how should\nI call this? I mean, the sha1 of the head of the submodule),\nto get a clean git-status.\n\nNow, I can't even switch branches.\n\nHow is this ment to work?\nI have no clue how I should work with this mess?\n\nI mean, I should be allowed to work on the submodule and somehow\nwork on the superproject at the same time? But none of my\nusual workflow works because I always get trapped by a\nmodified submodule.\n\n\tSteffen\n"},{"id":"50384","messageId":"3E1A1FB8-AD4D-4733-8525-4DAECD754F65@zib.de","threadId":"9466","inReplyTo":"769ABF7E-14C9-43D1-B879-138B6FF96B2E@zib.de","subject":"Re: How to work with submodule?","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-08-10T07:29:31Z","receivedAt":"2007-08-10T07:29:31Z","isPatch":false,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"\nOn Aug 10, 2007, at 9:02 AM, Steffen Prohaska wrote:\n\n> I mean, I should be allowed to work on the submodule and somehow\n> work on the superproject at the same time? But none of my\n> usual workflow works because I always get trapped by a\n> modified submodule.\n\nWhat I do now is to check with 'git diff' in the supermodule,\nwhich state of the submodule is expected. Then I bring the\nsubmodule in this state (even if this brings me to a detached\nhead). This keeps the supermodule happy.\n\nBut if different branches of the supermodule expect different\nstates of the submodule you may be forced to switch to another\ndetached head after every command you run in the supermodule.\nThere must be a simpler way, which I probably don't know.\n\n\tSteffen\n"}]}