Did countries like France, Germany or the United Kingdom keep troops in their respective African or Asian colonies to maintain their rule over the "Indigenous populations" when the home from was in dire need of reinforcement? Also, was there any significant rebellions/push for independence in the colonized country as large scale operations from their overlord was unlikely? Finally if no such thing happened how did the colonial power prevented/contained it?
There were a variety of responses on the part of African peoples to colonial rule. Supporters of colonialism in Europe claimed that the average African person welcomed colonialism. Colonialism, they argued, brought the end of slavery in East and Central Africa and brought a stop to inter-kingdom warfare in parts of West Africa. While there is some truth to the claim that colonialism brought peace to a few areas in Africa, and that there were some peoples who were initially thankful for an end to violence in their areas, the historical evidence does not support the claim that there was widespread support for colonial rule. Indeed, there is also considerable evidence of strong resistance to colonial rule.
By the beginning of World War I in 1914, all of Africa, with the exception of Liberia and Ethiopia, had been colonized, and initial African resistance had been overcome by the colonial powers. It is important to note, that around this time, the independence movements were not to strong. However, colonial empires did not have enough troops to defend colonial land.
A good example of this is the Senussi. The Senussi, encouraged by the German Empire and Ottoman Empire, played a minor part in the First World War, fighting a guerrilla war against the Italians in Libya and the British in Egypt from November 1915 until February 1917, led by Sayyid Ahmed and in the Sudan from March to December 1916, led by Ali Dinar, the Sultan of Darfur. And in 1916, the British sent an expeditionary force against them. Once the Ottoman Empire had essentially been tied down, the British and Italians were able to dedicate more troops to stop them. German contact with the Senussi shrunk and as a result they were defeated.
The Boers in South Africa also revolted, but a mere 12,000 versus a 32,000 is simply no match. The Colonial powers were not going to lose their colonies, especially how the liberal ideas of the century had spread like wildfire. For while the imperial garrison had been moved to France, South Africa itself was still able to raise troops.
France, too, suffered colonial revolts. As well as an anti French uprising in Algeria, the Thái Nguyên uprising began in Vietnam, which is widely considered the most serious anti-French outbreak during World War I, being described as the "largest and most destructive" anti-colonial rebellion in French Indochina
So, while many troops were sent, some definitely stayed - it was often vital to hold the colonies go uphold prestige: especially in the early 1900s, were things were very much like the previous century.
Sources:
Zinoman, Peter (2000). "Colonial Prisons and Anti-colonial Resistance in French Indochina: The Thai Nguyen Rebellion, 1917". Modern Asian Studies 34: 57–98. doi:10.1017/s0026749x00003590
Bunting, Brian (1969), "Chapter 1: The Birth of the Nationalist Party", The Rise of the South African Reich on the ANC website and says "The following books were written by or about ANC members and are provided here in full"
Plaatje, Sol (1916), "Chapter XXIII – The Boer Rebellion", Native Life in South Africa, P. S. King in London
Field Marshal Earl Wavell, The Palestine Campaigns 3rd Edition thirteenth Printing; Series: A Short History of the British Army 4th Edition by Major E.W. Sheppard (London: Constable & Co., 1968) pp. 35–6