In Germany, as I understand it, civic service can only be performed if you are "hired" by a recognized host organization, and host organizations must be non-profit, public, or community-benefit organizations.
So most certainly wouldn't be just "committing to Github projects from home", it would require a host organization to actually the legwork and get itself approved as non-profit but also as a host of civic services.
And knowing German bureaucracy, the above is not easy. ;)