Deductions & credits

I lived in New York in 2016. (I moved to the US in 2015 because I won my greencard in DV Lottery). I had a consulting job in Germany in the first month of 2016 and I fullfiled it from New York. The income in Germany is a self-employed income. In New York I was self employed, too and I worked under a IRS 1099 Form.
In Germany I paid tax (after filing in the US) for my revenue in Gemany. They added the income from the US and calculated the income tax rate. This income tax rate (for both incomes) was applicated to the german income.
In the US I paid the tax on IRS 1099 and on the german revenue.
In Germany I was told, that the tax I paid in Germany will be credited.

I hope I could explain in more or less clear for you. Thanks for helping.