I've never heard of git commits being used in a legal case, do you have any examples?

I don't know if it's been tested in court, but that's the rationale behind the Signed-off-by lines the kernel requires in all patches sent. It's a way to tell the (legal) ownership of a piece of code.