You should complete a P85 send it to the tax office to tell them that you have taken a job abroad.
As a minimum, you need to spend at least one full tax year starting on the first 6 April after you leave the UK as a non-UK resident to avoid having to pay UK tax on foreign earnings. April 1 2016 to 31 March 2017 is not a full tax year but you are only a five or six days short and might consider staying in Germany until 6 April 2017 at least. Take a look at RDR3 on the Statutory Residence Test here, a summary of the rules here and a flowchart here.
You need to look at the automatic overseas tests to see if you satisfy any of them. The full time working abroad test is the one you need to satisfy. You cannot spend more than 90 days in the UK in a tax year nor work too often in the UK. If you don't satisfy any of the automatic overseas tests, you need to consider the automatic UK tests. If you don't satisfy any of those, then you need to look at the sufficient ties test in combination with the number of days you expect to be in the UK. You may find the flowchart (link above) easier to follow than the notes in RDR3.
You need to keep a record of your movements in and out of the UK. A diary is a good way to do this but keep any details of the bookings you have as well. You will probably need to complete a tax return for 2016/17 and HMRC may ask for supporting information if you do claim exemption from UK tax for the German earnings.
Article 14 of the UK/Germany tax treaty here deals with employment earnings. If HMRC decide that you are UK tax resident for 2016/17, you will pay UK tax on your German earnings but will get credit for any tax paid on that income in Germany.
I hope this helps but let me know if you have any further questions.