Makes more sense to just not commit generated code without understanding it first. As has been said many times, writing the code was never the hard part. Software devs are still responsible for the integrity of implementation details.
At the end of the day, whether you copy-pasted the code from StackOverflow, let Copilot generate it or M-X-Butterfly'd it in yourself doesn't make a difference as you still need to understand thoroughly what it does.