It's risky, but it's not that risky. I'm sure freedom-hating, source-code-hoarding Apple has made the analysis that making Xcode work with copylefted git isn't going to make them reveal their source code. Back when Jobs got pwned by the GPL during his NeXT days, he probably vowed "never again", but that doesn't mean Apple has stopped shipping GPL'ed code.
If Apple can afford to use the GPL, i.e. they think the GPL risk is low enough for them and won't make them free their entire codebase, then anyone can also make this assessment.
Apple has very steadily migrated away from using GPL. Every major release there are fewer and fewer GPL packages in their systems and they use old versions of tools to make sure they are still under GPLv2 - bash 3.2, rsync 2.6.9, etc, apparently out of fear of GPLv3. They are off gcc, they wrote their own SMB code to ditch Samba, and have gone out of their way to avoid GPL wherever possible.
They have their (imo, silly) reasons to dislike the GPL. Fear of having to release all of the source code for all of their products is not one of them.
They have their reasons, but its hard for me to judge whether they're silly since they haven't made their legal analysis public or publicly explained why they've chosen the course they have.
During the GPLv3 draft phases, they publicly expressed concerns against the tivoisation clause, which is not at all surprising. Apple wants to keep some control over their users' devices.
They seem to have no problem with GPLv2, but since they are using the last and aging GPLv2 releases of a bunch of GNU packages, they seem to be moving to non-copyleft alternatives purely because there are no more updates to the GPLv2 versions.
They had no apparent problem in adding git to Xcode despite their overall GPLv2+GPLv3 purge.
Consider GNU Objective C. NeXT initially wanted to make this front
end proprietary; they proposed to release it as .o files, and let
users link them with the rest of GCC, thinking this might be a way
around the GPL's requirements. But our lawyer said that this would
not evade the requirements, that it was not allowed. And so they
made the Objective C front end free software.
Specifically, as I've spoken about in my many talks on GPL
compliance, the earliest publicly discussed major GPL violation
was by NeXT computing when Steve Jobs attempted and failed (thanks
to RMS' GPL enforcement work) to make the Objective C front-end to
GCC proprietary. Everything for everyone involved would have gone
quite differently if that enforcement effort had failed.
They're basically achieving their dream now with Swift, though. I don't expect them to ever release that source. I don't think there is any precedent for Apple releasing source code after the fact.
If Apple can afford to use the GPL, i.e. they think the GPL risk is low enough for them and won't make them free their entire codebase, then anyone can also make this assessment.