We have two teams, each using git, and would like to share a small project between them. Git submodules sounded like an obvious answer until I started searching and found lots of "submodules will bring you pain!" opinions out there. An answer to a related question here suggests git subtree, which seems to be baked in to some of our git clients but not others. I'm looking for a path forward.
More specifically: we have a dev team, a doc team, and a desire to add doc's examples to dev's test suite. We don't want to require doc to check out the whole dev tree (and there's a technical barrier anyway). We want both groups to be able to update the examples; for example, if a dev change is not backward-compatible, we want fixing the example to be part of the dev task and not technical debt. Both the doc build and the dev tests require the presence of the examples.
Members of the dev team are fluent in git. The doc team includes git beginners (though at least we have gotten them onto branches and off of master, finally). Dev is working on Linux (Ubuntu and RHEL) and doc is working on Windows using Tortoise Git (or in some cases the command line). It's ok if setting up a solution requires some work (I'm one of the more git-fluent doc-team members and this will be my responsibility), but we want using it to be straightforward for both groups. (If it's not, all those support requests will come to me.)
From what I've read, git subtree sounds like a viable option, but I can't tell if a repository can be a sub to two parents (doc and dev). How should I approach my sharing problem? Does git subtree do what we need, or is there something else we should do instead?
In case it matters, we're using our own server (with Bitbucket), not GitHub.