How to work with submodule?
- From
Steffen Prohaska <prohaska@zib.de>
- Date
- Aug 10, 2007, 07:02 UTC
- Message-ID
- <769ABF7E-14C9-43D1-B879-138B6FF96B2E@zib.de>
I tried to do some work on msysgit, but instead I'm fighting with submodule for a while now. Maybe I haven't understood something, but for submodule makes git nearly unusable. Here is what I did.
msysgit ist organized in the following way.
/.git (clone of repo.or.cz/msysgit.git) /git/.git (clone of repo.or.cz/git/mingw/4msysgit.git)
That is the root of the project is msysgit and as a submodule git is included. Working on the submodule is fine.
But it I start to work on msysgit itself I get lost.
I have some changes in the submodule and just want to commit some changes in the root, rebase to origin/master and push to mob. To make it a bit harder I have some local changes in the working tree.
This sounds quite simple, but I'm fighting with submodule for quite some while now.
I think the root of all trouble is that I changed something in the submodule git and now would like to change few things in the root. I have a modified submodule and this messes up everything.
I can't stash, I can't rebase.
I tried to commit the head of the submodule (btw, how should I call this? I mean, the sha1 of the head of the submodule), to get a clean git-status.
Now, I can't even switch branches.
How is this ment to work? I have no clue how I should work with this mess?
I mean, I should be allowed to work on the submodule and somehow work on the superproject at the same time? But none of my usual workflow works because I always get trapped by a modified submodule.
Steffen