Monica F. Helms--who, interestingly, created the Transgender Pride Flag--is a transsexual Navy veteran who began her transition at about the same age that I began mine. She made two videos tracing the history and contributions of transgender" and "transgender-like" people who served in the Armed Forces, from the American Revolution to the Gulf Wars.
She uses the term "transgender-like" because, as she points out, the term "transgender" wasn't invented until the mid-20th Century. While there are accounts of people who crossed gender lines and served in the military, the records and details of their lives are often sketchy, particularly about their lives after the military. Some "transgender-like" people may have crossed gender lines (as you might expect, from female to male) in order to enlist and returned to living in their birth genders after taking off their uniforms for the last time.
I suspect that in some of the earlier wars, gender-crossing might have been more common than people realized: a Union Army nurse during the Civil War estimated that she had seen 400 cross-dressing women in blue uniforms. There are accounts of women who lived as men, both in and out of the military, whose "secret" wasn't revealed until they went for medical treatment, or even until they died (as happened to the jazz musician Billy Tipton). However, by 20th Century, records and medical tests had become more accurate, so there are fewer accounts of female-to-male soldiers and sailors in the two World Wars than there were even in the Spanish-American war.
Anyway, Ms. Helms did a great job, I think, especially when one considers how much difficulty she must have had in getting the material for her documentary. For one thing, military and medical records from, say, the War of 1812 are far from complete. (Even in more recent times, records were destroyed in fires, floods and such.) Also, many families--and, I am sure, the Army and Navy--managed to keep secret the identities of many who served, particularly as spies. And, of course, one has to wonder whether very many people who were in a position to help--let alone the Armed Forces--were helpful.