Add additional gitparameter using groovy script

I’ve got a set of groovy scripts shared library to dynamically sets git parameter properties based on multiples repositories. I haven’t been able to figure out how to preserve the existing git parameters for each steps in the pipeline stage.
I need help to preserve the existing git parameter and append or add new git parameter based on the name of the repositories.