New to git, I have searched a lot, didn't find a robust solution.
I got 2 projects, A and B.
A contains [A code] and [SHARED CODE], B contains [B code] and [SHARED CODE].
With svn, I could put a svn external in project B that links to subdirectory of project A, meaning A->[SHARED CODE].
However, it seems git does not allow partial clone, so if I choose submodule, I have to make it 3 projects: SHARED CODE, A and B, that is painful.
Worse is, when I make some change in A->[SHARED CODE](which is a submodule), it seems quite hard to commit and push it, and a git pull operation on B does not automatically pull the latest code to B->[SHARED CODE].
So any convenient solution for this? Thanks.