Imagine that I have a repository with the Dir1 and Dir2 directories, and I in branchA.
Imagine that I want to get rid of the contents of Dir2 and replace them with Dir2 in the main branch, preserving the contents of Dir1.
I do not expect this to be so simple, but ideally:
cd Dir2 git [magic that replaces current dir with the contents of master branch]
source share