The British were the first to invent the tank during WWI, and so the Germans were forced into the position of being the first to undertake the difficult task of developing anti-tank weapons. The Kaiser's army approached the issue of protecting infantry from tanks in a pretty straightforward way: if regular machine guns and rifles can't penetrate the new British wonder weapon, then make a larger rifle.
The first rifles against the first tanks
The idea of building a larger caliber weapon led to the Tank und Flieger (TuF) Maschinengewehr machine gun and the Tankgewehr (or T-gewehr) rifle. Both were designed to use the new 13,25×92SR round developed by the Polte company. The machine gun was essentially an enlarged MG-08 (the German variant of the Maxim gun). The Germans didn't have time to properly ramp up production of the machine gun before they surrendered, but they got the chance to put the first ever anti-tank rifle to use. Single shot variants of the Mauser rifle made it to the front lines and even claimed some enemy tanks, according to some sources.
"The penetration obtained with domestic 7.92 mm metal-ceramic ammunition, even with a new rifle, does not fully enable combat against enemy light tanks which have 30 mm of front armour. After 100 shots the rifle becomes useless against armoured targets."
The GAU concluded that the project should be closed, although a number of rifles that were already produced were used in the defense of Tula.