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. ;)
I'm no lawyer or expert on these matters, but I know that Codeberg e.V. is considered charitable, so the people hired by Codeberg should be eligible for this already, I think.
I don't know if KDE e.V. is also considered charitable, but I assume they are, and they also hire developers. I'd be curious to learn how the tax reports in these situations work.