1590s, in reference to the horizontal and vertical lines of soldiers marching in formation, from rank (n.) in the military sense of "number of soldiers drawn up in a line abreast" (1570s) + file (n.1). Thence generalized to "common soldiers" (1796) and "common people, general body" of any group (1860).
"one who leads a military patrol in formation in a jungle, etc.," 1944, said to be from point (n.) in military sense of "small leading party of an advance guard" (1580s) + man (n.). A more literal sense also is possible. Point (n.) in U.S. also meant "position at the front of a herd of cattle," and pointman in this sense is attested by 1903.
"pursuit of anything in ignorance of the direction it will take," hence "a foolish enterprise," 1592, first attested in "Romeo and Juliet," where it evidently is a figurative use of an earlier (but unrecorded) literal sense in reference to a kind of follow-the-leader steeplechase, perhaps from one of the "crazy, silly" senses in goose (n.). Wild goose (as opposed to a domesticated one) is attested in late Old English (wilde gos).