Yes, federation would be great for git. I just hope that an open protocol is designed rather than something GitLab specifc. GitLab takes a lot of resources to self-host.
The current talks are about basing it on ActivityPub which is an open spec but of course it would only work on software which supports it.
Would be nice if Microsoft gets onboard for such a protocol. Especially once they own GitHub. Would also be funny if Microsoft Open Sources GitHub much to everyone's surprise.