Description of the bug
If we are syncing a pipeline and there is a pre-commit fail, the changes can't be committed to the TEMPLATE branch and sync fails.
Work started in #3371
Example error: https://github.com/nf-core/tools/actions/runs/12431872066/job/34714198777

System information
No response