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!
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.
1. https://github.com/byrongibson/scripts/blob/master/git-rm-su...
2. http://stackoverflow.com/questions/1260748/how-do-i-remove-a...
There is a horrible habit of people forking projects on github just so their submodule stay stable. It's broken.
> There is a horrible habit of people forking
> projects on github just so their submodule
> stay stable. It's broken.
People are forking projects on github in that way because it's a quick, easy, cheap way to create a mirror/hosted copy of the repository they want to use.I don't see how this is an example of how git-submodule is broken. If you want to use someone else's code, that is under someone else's control in your repository without creating your own backup of said code, then you're the one taking the risk by not creating said backup.
If the git-submodule is mission-critical to you then you should either:
1. Always keep a separate mirror of the 3rd party repo.
or
2. Mirror the 3rd party repo to a hosted location, so that your submodule can point to the mirror instead of the source (basically creating a caching layer under your control).
This is no different than the guy that keeps all of his email in Gmail, then complains because Google shut down his account that 'email is broken' because it's possible for this to happen.
I hear this kind of thing all the time, but I don't understand why. I've never had any problem whatsoever with git submodule. Can you elaborate a bit on what you mean by this?