This is such a common scenario that there must be a sensible solution, yet despite pages of reading and copious Git gymnastics, my brain aches and I\'m unable to make this work.
Clearly you've been thinking about this, and I am only a novice at git, but my first instinct would be to add .gitignore to the plugins directory and have each plugin have it's own git repo. You could do the same for themes. So I guess this is more of a question than an answer - why wouldn't this simple approach work?
I don't know if this will answer your question in full, or even cover your specific scenario, but I thought I'd give it a go in any case.
We have multiple projects, many of which reference each other, each in their own Git repository. They are also contained in multiple levels of folders, for example:
Repos
- Utilities
- Util repo1
- Util repo2
- Common
- Lib repo1
- Lib repo2
- Projects
- Client1
- Git repo1
- Git repo2
- Client2 repo
- Client3
...
We had an issue with manually having to push / pull / commit each repository, which became a nightmare.
So we wrote a little utility program that is able to do push, pull, commit, tag, remote diff and diff Git operations on multiple folders at a time, as well as build multiple VS solution files at the same time. It will also check in sub folders for repositories.
We have been using it for some time now, and it works fine for us. You can check it out from here: Gitter.7z
Open the ReadMe.html file to see how to use it. Hope this helps out, let me know.