Pan-German nationalism (Pangermanismus or Alldeutsche Bewegung, German) was a movement significantly beginning in the 19th century, which became a major part of Nazi doctrine, to have all German-speaking Europeans in a single country. Movements began after the Napoleonic Wars, but accelerated with the creation of the multi-ethnic German Empire and Austrian Empire. German speakers were the majority in the former, but not in the latter, under the House of Hapsburg.
There was a distinct concept of German identity among 18th and 19th century thinkers, which did not necessarily tie to specific geographical bounderies. The idea of unique territory grew with the idea of a unique French physical nation, after the French Revolution.
Napoleon had disbanded the largely German Holy Roman Empire in 1806. Ernst Moritz published the four-volume Spirit of the Times, between 1806 and 1818, which urged German speakers to recognize their unique identity.
After Napoleon's defeat at the Battle of Waterloo in 1815, European powers, led by Prince Metternich of Austria, sought a police system to control revolutionary liberalism in the German- and Czech-speaking areas of Central Europe. This broke down in the revolution of 1848, which was put down by Austria and Prussia. They reestablished the Metternich-inspired confederation. 
19th century colonial period
The unification need not be in one contiguous country, but, in the 19th century, was seen as including colonies, according to Ernst Hasse, founder of the Pan-German League, which was formed in 1894. He said "we want territory even if it belongs to foreigners, so we may shape the future according to our needs." If other powers exchanged land or adjusted colonial boundaries, Germany, under this doctrine had the right to territorial "compensation", based on Germany's being the dominant land power in Europe and prepared to enforce its demands. 
World War I and aftermath
The first Anschluss attempt to merge Austria and Germany, in 1918, failed due to the requirements of the peace treaties.
In Nazi doctrine
Naming the Nazi regime the Third Reich sought legitimacy by associating it with historical states considered German.
- Hagen Schulze (1991), The course of German nationalism: from Frederick the Great to Bismarck, 1763-1867, Cambridge University Press,pp. 47-49
- Richard J. Evans (2003), The Coming of the Third Reich, Penguin, ISBN 1-59420-004-1, pp. 4-5
- Robert Massey (1991), Dreadnought: Britain, Germany and the Coming of the Great War, Ballantine, ISBN 0-345-47556-4, p. 136
- George W. White (2000), Nationalism and territory: constructing group identity in Southeastern Europe, Rowman & Littlefield, p. 65