For those of you who share my weird fondness of manually editing config files, adding (or modifying) the following would also do the trick.
.git/config (personal config)
[submodule "cookbooks/apt"]
url = https://github.com/opscode-cookbooks/apt
.gitmodules (committed shared config)
[submodule "cookbooks/apt"]
path = cookbooks/apt
url = https://github.com/opscode-cookbooks/apt
See this as well - difference between .gitmodules and specifying submodules in .git/config?