If you are a tax resident outside of Germany while you are working in Germany, stay in Germany for less than 183 days, and get paid by your non-German employer you will most likely not have to get involved with German taxes at all (some exceptions may apply). Whether the 183 days are counted during the calendar year or a 12-month period can vary from country to country (as defined in the Double Taxation Agreement between Germany and your country of residence).
You can find more information on the Double Taxation Agreement at: http://www.bundesfinanzministerium.de.