Both history and Geography are excellent choices as optionals. However, going by the statistics of previous years alone, geography is a better choice than History. This is because the pattern of question in history has now started changing and questions are asked from pretty unconventional areas.
Let’s go through things you should consider before selecting either as your optional subject
Interest:
Which subject interests you more? This is very important because for the next one year you are going to read thoroughly on the subject. Then you are going to re-read those same portions. And then again. This is going to go on till the last day of the exam. You have to be pretty interested in the subject to get this going in your life. Please don’t misunderstand your liking for the subject as interest. Let me illustrate using an example.
Consider the Indian defeat at Battle of Plassey. If you check quora, you will see a lot of half cooked answers by “specialists” on how Indian failure to use tarpaulins and the fateful rains on the day of the battle was the reason for the defeat. While those explanations are very amusing to read, it is a wikipedia historian’s answer. True historical analysis, goes into the technicalities of the subject, like how historically Bengal Nawabs had ignored use of technology, economic factors, differences in political/administrative organisation etc. A lot of it is very boring and unrewarding. You will throw in the towel if you are not passionate about the subject. This goes for geography also.
Syllabus
History syllabus is considered one the vastest in the lot. It would take anywhere from 6-8 months to complete the first iteration, depending on how thorough you are going to be. This would still not ensure you success.
Compared to history, geography has an easier syllabus. My friends tell me that it would take 4 months to complete the first iteration.
Do remember these times keep coming down with each iteration. Remember that these times can considerably vary from person to person.
Maps
Both history and Geography have map study as a question. However in history there is more weightage (50 marks, 20 spots) vis-a-vis Geography.
Another disadvantage in history is that you have to be thorough with the place and its features. This is because in geography, you are given the place name and asked to mark it in the map.
In history, you will be provided a clue on an already marked place and you have to write the name of the place. Believe me, this is the most disadvantageous thing about history. There are close to a 1000 places that you need to remember with their historical significance and location on a mere outline map. It is going to be tough.
I can provide an example.

Consider location VIII. The only clue that they have given is that it is a Paleolithic site. For you to answer this, you need to know the Paleolithic sites in India, what its significance in Indian history is etc. In this case, it’s Hunsgi. That is a relatively easy name to remember. Think you will be able to remember and recollect names like Yerrakondapalam, Muchatlu Chintamamu Gavi etc?
Compared to this geography maps are a breeze, where you are given a river name or a place of geographical significance and have to mark it.
Question pattern
While history questions are now a days focus on economic, social and cultural history (gone are the days when you had to remember long line of Kings and Dates. If you are studying history that way, you are studying it the wrong way), Geography is now more about application of geography to contemporary society. This year’s geography paper had questions based on Panchayathi Raj, National Transportation Policy etc. You are going to have some idea on many of these topics. However do remember, it might be oversimplifying, if you assume that I’m saying geography can be highly scoring without effort. These questions demand technical answers and not some blabbering on how transportation sector can be revolutionized with policy and so on.
Application in GS
Here both topics have advantages. GS Paper I is almost entirely based on history topics, while GS III is almost wholly economic and human geography. No particular comparative advantage can be stated.
You have to also remember that UPSC pattern has changed over the last two years making sure that these advantages are neutralised. Questions are more on the analytical side and not factual.
Finally..
I know it has been a long answer and my analysis was more skewed towards the disavantages of History. This is because I have history as my optional. Someone with Geography optional can provide much detailed analysis on the advantages-disadvantages of Geography.
I did not mention much about the advantages of studying history. So let me just fastly mention them
- Highly rewarding (The feeling when you get that map right!!)
- You know the background of most things that are happening. (Crimean war, Israel-Palestine conflict, European Union etx)
- You learn to look at issues in a different light. (Why did so many religious movements arise in India in the sixth century BC? Mere coincidence?)
Chosing the optional subject correctly and wisely is a very important decision that can make or mar you. I wish you all the best.