Demanding that the law of a country should be followed by another is totally no sense. They can agree, make agreements about it, and even take legal action to the Highest court, so it could be evaluated, but using your nationality as an argument of what you can do, it's just plain wrong.
I always find it weird how people respond to my comments. Why didn't you check what the US law is like for source code? A lot of places have similar laws around source code, primarily in the West because of efforts to normalise laws across countries, driven by US efforts. And other countries? Well, it's the same for any kind of IP. Either the country has strong IP law and you have the resources to pursue an issue or not and you can't do anything about it.
This is nuts. How can anbody be expected to both know that you’re German and German law when you post on an international website?
Or is this a German law that exists to prevent other Germans from doing things but that the rest of the world scoffs at?
This is the legal expectation in general, not just for software - you can't just come across a design for a neat widget somewhere and start using it in your product, there's probably both copyright and patent on it. Software isn't special. Not everything in Github can be copied into your code verbatim.