In matters of style, swim with the current: in matters of principle, stand like a rock.
Source, in full
As quoted in Careertracking: 26 success Shortcuts to the Top (1988) by James Calano and Jeff Salzman; though used in an address by Bill Clinton (31 March 1997), and sometimes cited to Notes on the State of Virginia (1787) no earlier occurrence of this has yet been located.
Notes from Wikiquote
"It is not clear where the phrase originated from, but there is no proof that Jefferson ever uttered these words." Huff, Elizabeth In matters of style, swim with the current...(Spurious Quotation). at Thomas Jefferson Encyclopedia, Thomas Jefferson Foundation. June 8, 2011