For some cases, you have a working git repo, but you want to include a library which is another git repo. You cannot use git clone, because it will take overlap with your git repo, so you have to use git submodule:

git submodule add http://another/git/repo 3rd_lib