TFS build with multiple GIT repositories
As @jessehouwing mentioned there is no way to build multiple GIT repositories by default. @jessehouwing and @Giulio Vian have provided some workarounds here:
Use Nuget or other Package Manager to store the 3rd party libraries, and add a NuGet restore task to restore the libraries.
Add Command Line task to call git.exe to pull the additional repositories.
Create two build definition, in the second build definition, you need to add a powershell task. In the powershell script, you can use TFS REST API to queue the first build definition.
But none of them will associate commits and work items in two repositories with one build. I found there is already a UserVoice at website below, you can vote it:
https://developercommunity.visualstudio.com/idea/365522/allow-tfs-build-to-depend-on-multiple-repositories.html
No, this is currently not possible. Instead, it's recommended to have your 3rd party libraries built and stored in the Package Management feature (as a NuGet or npm package) and take a dependency on the package instead of the source. This will not associate work items on 3rd party dependencies though.
Of course, if you really want to, you could call git.exe from a powershell or batch script and fetch the additional repositories. This will not associate work items either though.