I'm in the situation where I'm developing two projects at the same time, where the second project is used by the first project, but is intended to be reusable by other projects. For this reason, I've been keeping them in two separate repos. I can foresee that this will bring huge headaches somewhere down the line, though. My worry is that I will make many commits to project 1 and 2 in parallel, then be forced to revert to an earlier commit in project 1 only to find that I need to also revert project 2 in order to even compile project 1. Tracking these two projects in separate repos is less than ideal for this reason, but I don't think I should track project 2 in project 1's repo. What is a better solution for this?
Using source controlled libraries in source controlled projects
This particular question suggests using mercurial subrepos. This sounds like a sort of good idea (in that it would work, but is cautioned against by mercurial). Unfortunately, I'm using git, and I don't know of any equivalents.