When you are adding or editing a module, there are some advanced options, hidden under a spoiler below the Module Pull Options section. These advanced options allow you to select a section of the external repository to add to the parent repository.
Specify a directory in the external repository to add as a module, or select it from the tree by clicking on the three-dot button. This directory will become the module root in the parent repository, and only its contents will be added and synchronized.
You may also specify some files to be excluded from the synchronization. You may use the same syntax as for .gitignore files. For example, if you enter *.bin in this field, all files with the "bin" extension will not be added to the module folder in the parent repository