Narrative:

On initial climb; after takeoff runway 28L; we encountered wake turbulence from [preceding B787 heavy]. As the pilot flying; I immediately turned the aircraft to the left; (over the ocean and away from terrain and traffic). The first officer (PNF) notified ATC; once out of the wake; ATC [gave] us direct 'linuz' to avoid the wake from [the aircraft] ahead of us on the same route.

Google
 

Original NASA ASRS Text

Title: B777 Captain reported encountering wake turbulence departing SFO in trail of another wide body aircraft.

Narrative: On initial climb; after takeoff Runway 28L; we encountered wake turbulence from [preceding B787 heavy]. As the Pilot Flying; I immediately turned the aircraft to the left; (over the ocean and away from terrain and traffic). The First Officer (PNF) notified ATC; once out of the wake; ATC [gave] us direct 'LINUZ' to avoid the wake from [the aircraft] ahead of us on the same route.

Data retrieved from NASA's ASRS site and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.