Define "average code commit." If you knew the average commit size you could probably come up with some ballpark number of electrons consumed and CO2 released. Now I have one more thing to cause anxiety and lose sleep over, as if plastic straws weren't bad enough.
Once we have solar everywhere (thanks Elon!), nuclear fusion, and can harness entire stars to power blockchains and LLMs we won't care about this. It's not far off now.