Green’s Dictionary of Slang

guess n.

SE in slang uses

In phrases

by guess and by God

by sheer luck.

[US]D. Hammett Maltese Falcon (1965) 332: You’ve got to convince me that [...] you’re not simply fiddling around by guess and by God, hoping it’ll come out somehow all right in the end’.
[US]Reader’s Digest Oct. 79: No more job training ‘by guess and by God’ [DA].
[US]Randolph & Wilson Down in the Holler 232: by guess and by God: phr. More or less at random, without any accurate measurement.
[US]in Sports Illus. 15 Apr. in Davis (ed) Permanent Wave 221: ‘I can’t say I’m an expert whitewater canoeist. It’s by guess and by God with me’.
by guess and by godfrey [naut. use; to steer ‘at hazard without a set course or without the guidance of landmarks’ (OED)]

taking a course of action or movement without any real plan.

J.C. Lincoln Keziah Coffin vii 104: If ever a craft was steered by guess and by godfrey, ’twas that old hooker of Zach’s t’other night [DA].
by guess and by golly (also by guess and by gosh, ...jingo)

(US) haphazardly, without a planned direction, at random.

[Journal of Outdoor Life (N.Y.) 15 Nov. 335: The forms in use are the birch and primitive log pirogue, with a few lapstreaks of uncertain shape and unknown weight, and for the most part built ‘by guess and by greenness’].
Journal of Outdoor Life (N.Y.) 17 Sept. 175: The course was triangular, 3 miles on a side, twice around; but no the buoys were set ‘by guess and by jingo’ by an old fisherman, the course was not more than 14 miles all told.
[US]N.Y. Times 12 Jan. 27: Now, I don’t propose to run my oyster cooking by guess and by gosh, but I have a thermometer and require the fat to be heated to a certain temperature.
[US]J.C. Ruppenthal ‘A Word-List From Kansas’ in DN IV:ii 104: by guess and by golly, prep. phr. Hit or miss. ‘I didn’t have anything to go by. I just did it by guess and by golly’.
[US]National Geographic Mag. Sept. 326/2: The long sand trail needs one who can drive by guess and by gosh and feel cheerful in the midst of seeming chaos [DA].
[US](con. 1916) G. Swarthout Tin Lizzie Troop (1978) 113: Don’t go by guess and by gosh, get to know ’er inside out.