How do you beat Yasuhira Koga in Ghost of Tsushima?

Quick answer: Block his normal hits and sidestep his unblockable attacks, then strike while he recovers. At the blade lock, use the new Heavenly Strike to win.
Show walkthrough (quest spoilers)
Block and counter
Yasuhira is fast and can kill you in a few hits. Block often and only hit back when it is safe. Do not trade blows or chase long combos.
Sheathed sword attack
When he sheathes his katana, an unblockable draw strike is coming. Do not attack first, because he is quicker on the draw. Sidestep with a single dodge, not a roll, then hit him at once before he recovers.
After he sidesteps
When he steps to the side, he usually opens with an unblockable attack. Roll out of range, or sidestep and counter. Use Resolve to heal when your health gets low.
The finish
Near the end you lock blades. Jin says he understands the Heavenly Strike; use it when prompted to end the duel.
Reward
You learn the Heavenly Strike technique and get a Sword Kit. Bury the grandfather afterward to finish the Heavenly Strike walkthrough.
