This sequence would get you set up:
cd <my-project-dir>
git submodule add <github repository> <my-third-party-dir> # -b <branch> optionally
git submodule init
git submodule update
At this point you've got my-third-party-dir populated with a particular commit (a detached head). Your project will have two changes.