There is the subtree merge.
But here is an easier but partial solution that perhaps is good enough for your needs. Just fork and periodically merge back.
- Fork (clone) the repository
- Remove parts you do not need and move the sub-folder to where you do need
- Commit
In the future, when you want to sync back up with the upstream Git code, just merge it with your fork. The files which you kept will sync back up with those from upstream, and you might have some small cleanups to do which are easy to see from git status
.