- Checkout the git source as we need to get to the contrib directory. There will be no need to compile git itself.
- Instide a shell go into the git/contrib/subtree directory.
- Run make to prepare subtree.
- The Makefile makes some assumptions about where git will be installed that aren't correct for ubuntu. So, running make install will show an error. Instead run sudo install -m 755 git-subtree/usr/lib/git-core to install subtree.
- Remove the git source (unless you want to keep it around for another reason).