Running out of Video Memory when using Source Control

I have this problem too with a rtx 2080 and rtx 3070, any solution???
It happens when I checkout or submit files.