The problem with subtree is that C is part of B history.
If you can reference a B without C as a subtree, then you can go the submodule route:
- add C as a submodule to A
- add C as a submodule to B
- make sure A and B references the same C SHA1
- update only the C from A (git submodule update) in order to get only one C source.
The idea is to:
- keep two references to C (in order to detect a possible discrepancy between the C used by A and the one used by B)
- update only one of the two C submodules.