In 1850, Prince George became Duke of Cambridge. This was in the middle of his military career, and he would go on to serve in several other positions before retiring in 1876.
The Illustrious Legacy of Prince George, Duke of Cambridge: A Quiz on British Royalty and Military Command