Variations were used by Southern troops and Northern troops during the American Civil War. For instance, the Southern song "Bonnie Blue Flag" (the blue flag with a white star that symbolized secession, and oddly, unity) has this verse -
For Southern Rights, Hurrah
Hurrah for the Bonnie Blue flag
Which bears a single star...
It was the word people used back then instead of todays "hooray". The Northern troops are documented to have yelled "Hoosah" (yes, with an 's') at several battles. I don't know if this was because of the peculiar accents many Norther troops had due to the high volume of of immigrants or maybe another cause. But I believe that a mispronunciation catching on is most likely the reason for the difference. Civil war reenactors still yell out "hoosah" in keeping with tradition during mock battles. In fact, you can see them doing it in the movie "Gettysburg".
The origins of hooah, I think, lie with the French and German professional soldiers we had training our continental army during the revolution. Most likely, in my opinion, a "hurrah" was a praise from a Hessian or French training officer. I have an ancestor who was one of those German officers. Hessians were equal to the French and British and were amongst the most professional soldiers in Europe. The king of the old German Kingdom of Hess would rent them out - and the British hired them to fight the Americans. Many defected to the colonists to gain land or a new life, or simply switched sides when caught.
At any rate, there were German and French officers and NCO's training our army. I truly believe that hooah was born during this time through those foreign military advisors. It is unique to the American military, so it was not inherited through Britain. And we certainly did not pick it up from the Arabs during the Barbary Wars (with the limited excursion that was), the Mexicans during our war with them, or the Spanish in 1898 in that blink of an eye war.
Much of the information in this article obtained from the U.S. Army and U.S. Marine Corps