Not sure if there is a better approach but we place SCA source code, Extension Dev Tools and Theme Dev Tools in separate folders when we are putting it in a remote git repository.
Attached are a view of git repo root folder and the contents of .gitignore