A lot of civilizations of yore were much cleaner than we imagine them, actually.

Vikings were obsessively hygienic and seen as 'girly' by the Anglo-Saxons for it and 'still too dirty' by the Muslims. On the continent, the old Roman bath-houses saw a lot of use until the combination of the Black Death, um, joining in on the watery fun and the Pope trying to shut down the sex trade going on in them. This and some other factors combined to make 1400-1900 really filthy and horrifying, in Europe at least. (The Native Americans hated dealing with colonists because of the unholy stench.)
Certain Celtic tribes, particularly the rock bands of Brythonic England, would spike their hair with lime, worn 'relatively' short. Gauls were famous for their long curly mustaches, their delicious and ingenious cooking, their craftsmanship, and their bloodlust. The more things change...
The Romans were famous for their curiously clean-shaven, close-cut haircuts. Amusingly, they picked up soap from the Gallic tribes to the north, and even then, it took them awhile to figure out how to use it. The Gauls laughed for a decade or two and then gave them advice.

Having outlived their usefulness to the world, Caesar conquered Gaul and used his fabulously well-groomed self to become Dictator of the Fashionista.

And apparently popularized comb-overs.

He also enforced short hair-cuts for the Gauls, because losing the Battle of Alesia wasn't enough, they really had to feel the burn of failure.
The Greeks saw long hair as being pretty rad. So, to be passive-aggressive, you get a lot of shaven slaves walking around the estate getting sunburn on their head.
The various Germanic groups that took over the territory of the deceased Western Roman Empire largely kept their traditions of long hair.
So yeah, most of the time throughout history people have worn their hair long. In the West, trench warfare and lice led to the military adopting short haircuts and carefully rationed mustaches. This continued the trend of long hair as a sign of privilege, rebellion, and the short hair as a sign of conformity and efficiency. (Take a guess at how long my hair is.

)
For dirty hair, look up Polish plait. I don't want to go into further detail on that, I'm a squeamish neat-freak myself.
http://en.wikipedia....ki/Polish_plait
On a brighter note, the Poles were known for their 'Scythian' style hair, including dreadlocks. The nobility was very fond of mohawks, which led to some funny conversations when the Mohawk tribe became known over in Europe. (Sources are scarce on the Polish-Lithuanian Commonwealth v Iroquois Confederacy War of Hairstyle Copyright, but I assure you, it was totally legit.)
It seems nomadic groups like to tie their hair up in all kinds of cool ways.
East Asian cultures seems to prefer women's hair to be tied up into buns and tails and what-not. This leads to those scenes in action movies when the strapping hero's bun falls out of place, and he gets angrier, and his shirt mysteriously disappears as he starts hacking hapless mooks to pieces. Or the scene in Avatar, when Azula saves herself from a death by falling with a hairpin, and looks even more deranged as her hair falls loose. In the finale, her failure to pin her hair and then pulling a Sera showcases her descent in insanity eloquently.
The British Isles has a curious history with hair. Beyond the obvious Roundhead and Cavalier differences, the Irish wore long hair, and often one's hair was a declaration of allegiance. An English king thought long hair was womanly, and wanted his soldiers to cut it. Alexander forced his soldiers to shave their long beards and hair to prevent grappling, much to their dismay.
Some cultures, like the Chinese, Koreans, and Japanese, I believe, considered it a sin to cut one's hair, as it was a gift from your parents and that was spitting in their face. I'm not sure what time frame it covered, but the 16th century Japanese daimyo Date Masamune was scorned by his mother under similar reasoning for having the audacity to lose an eye to smallpox.
I apologize for the typically disorganized format of my post.

I was tired and I was curious how long I could ramble about hair.

Tl;dr: The sexily short-haired Romans and Alexandrine Greeks are the stand-outs for short hair. Nomads specialize in awesome hair. Poles are at either end of the poles. Lice were responsible for the military's switch to short hair. England has issues with hair. The Pope doesn't want people having sex in bathhouses, but the Black Death does.