We regularly encounter errors like this, if we don't do everything in exactly the right order.
sourcetree git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch --no-tags origin main:main
The work around is to delete the local git folder and reclone it, but it there an easy way to fix it from the UI not the terminal.