29 ms·
Off the top of my head: Ever tried removing a submodule? Why is there no git submodule rm? (No, "it's confusing" is not a valid argument.) If the pull fails (
by primatology 14y ago
Off the top of my head:
Ever tried removing a submodule? Why is there no git submodule rm? (No, "it's confusing" is not a valid argument.)
If the pull fails (say, from the wrong protocol), you end up with a half-baked submodule. Impossible to move, impossible to remove, impossible to update unless you dive into the config.
Misspell the folder you wanted the submodule in? That sucks. Go delete it from two separate locations, and try again!
- nodemaker 14y agoYes these problems suck. Sometimes I have deleted my entire repository and cloned it again to update the submodules just because I changed the .gitmodules file. Note: This actually takes less commands than messing around with .git/config.
- Confusion 14y agoIf that is the worst problem -- one that is easy to solve and easy to repeat the few times you need it -- then the more love for submodules. I'll take that over any other available solution any day (I don't count subtrees as 'available' yet).
- SkyMarshal 14y agoSpeaking of git submodule rm, here's a basic script I use for that [1], based on Stackoverflow's answer [2]. 1. https://github.com/byrongibson/scripts/blob/master/git-rm-submodule.sh https://github.com/byrongibson/scripts/blob/master/git-rm-su... 2. http://stackoverflow.com/questions/1260748/how-do-i-remove-a-git-submodule http://stackoverflow.com/questions/1260748/how-do-i-remove-a...