I read this thread and do not really understand the reply. I am getting the same error the first time I run iTerm2 after a reboot on a mac M1.
The author of that reply said
It means two symbols are defined twice in the git program that’s first
in your path (or that you call by a full path).
Is this a bug in iTerm2?