Before the war
Prior to the developments of the Second World War there was a history of the German Army committing violent acts against civilians in previous conflicts. During a rebellion by the Herero and Nama natives of a German African Colony in 1904, the German Army was tasked to quell the uprising. General Lothar von Trotha, the Commander tasked with eliminating the uprising, remarked "against 'nonhumans' one cannot conduct war "humanely'". This conflict resulted in the death of 66-75 percent of the entire native Herero population and 50 percent of the Nama population. By contrast, the German army lost only 676 soldiers in combat over the course of the conflict. Additionally, the Zabern Affair was an incident which showed the German military's indifferent attitude and eventual extrajudicial and illegal activity when individual soldiers were known to have committed violent acts against civilians.
During the First World War, the pattern of civilian brutality continued. During the German invasion of Belgium in 1914, the Germans were recorded to have deliberately killed 6,427 Belgian and French civilians. These attacks were in response to a perceived resistance from the civilian population. However, it has since been shown that there was in fact no significant resistance from the population that would have warranted these levels of civilian casualties. In August 1914 during the German attack on Russia, the German army burned, pillaged and murdered many inhabitants of the Polish city of Kalisz (Destruction of Kalisz).
When the National Socialists (Nazis) came to power, it was welcomed by almost the entire officer corps of the Reichswehr as a way of creating the Wiederwehrhaftmachung (remilitarization) of Germany, namely the total militarization of German society in order to ensure that Germany did not lose the next war. As such, what both the Nazis and the German Army wanted to see was a totally militarized Volksgemeinschaft that would be purged of those perceived internal enemies like the Jews who it was believed had "stabbed Germany in the back" in 1918.
Many officers therefore willingly embraced National Socialist ideology in the 1930s. Acting on his own initiative, the Defence Minister Werner von Blomberg had purged the Army of all its Jewish personnel in February 1934. On December 8, 1938, the Army leadership had instructed all officers to be thoroughly well versed in National Socialism and to apply its values in all situations. Starting in February 1939, pamphlets were issued that were made required reading in the Army. The content can be gauged by the titles: "The Officer and Politics", "Hitler's World Historical Mission", "The Army in the Third Reich", "The Battle for German Living Space", "Hands off Danzig!", and "The Final Solution of the Jewish Question in the Third Reich". In the last essay, the author, C.A. Holberg wrote:
The defensive battle against Jewry will continue, even if the last Jew has left Germany. Two big and important tasks remain: 1) the eradication of all Jewish influence, above all in the economy and in culture; 2) the battle against World Jewry, which tries to incite all people in the world against Germany.
Attitudes like the ones expressed above colored all the instructions that came to Wehrmacht troops in the summer of 1939 as a way of preparing for the attack on Poland.