There's three basic types of Yamaha 125/175 air-cooled top ends. Beware the 100 motors which have a shorter stroke, and consequently aren't directly interchangable with the 125/175 motors.
1. Early, with four long 8mm studs coming out of the cases. The barrel is sandwiched between the head and cases. All twin shock bikes and YZ125C/X and YZ175C have this set-up.
The YZ175 top ends may not fit on the others though, as apparently the studs are further apart to allow for both the larger bore and decent sized transfer ports.
2. Middle. Four short 10m studs out of the cases, that hold the barrel to the cases. Then there's 8mm studs out of the top of the barrel to hold the head on (125s have four 8mm studs, 175s have six).
All monoshock DT125/175s, YZ125D/E/F, IT125, IT175D/E/F have this set-up.
Beware the 85+ DT175 top ends - they run a shorter rod and different piston.
3. Late. Five 8mm studs out of the head. Fitted to all of the bikes with the engine with the chain on the RHS - IT175G+, YZ125G.
IT200 is similar but different - their longer stroke means that they're not a bolt-on fit. Also beware the change-over from offset exhaust port to centre port, begining with the IT175J.
Within the groups, you can mix and match top ends as you see fit - but watch out for stuff like exhaust pipe clearance against the cylinder head, exhaust pipe mounting to the barrel, and intake boot/reed block size etc. I can give you more detail on this if you've got a specific question.
Within the groups, the base gaskets are all the same.
The head gaskest are all the same as other bikes of the same capacity, within the same group.
Most of the bikes mentioned have interchangable conrods. The exception is the 85+ DT175 (as metioned). The water cooled YZ125s ran a slightly shorter 'rod (not sure if its the same as the 85+ DT175 rod - will check tomorrow).