I hope to understand what you are asking, you want that from your branch SRC only include the branch folder dist in master, if so, the following occurs to me (it is quite simple).
Just go to your branch SRC, create a new branch to not touch the one you have:
git checkout -tb SRC-solo-dist
Then delete all the folders that do not work, basically everything except "dist", if you do a git status you will see that all the files are marked as "deleted" this clearly means that when you commit these files will disappear, so make the commit:
git add . (para agregar todos los cambios)
git commit -m "dejando solo la carpeta dist" (para hacer el commit y dejar un mensaje)
Now you have a branch as you want it in master, the next is to replace master for this branch, be careful as well because this process will break everything you have in master.
To finish you just have to do a push to master using the -f option (--force):
git push master -f
I hope it works for you.
greetings