Unable to load revisions

When I try to compare my changes to the git repository using Code Review, Xcode says "Unable to load revisions". For the same file if I check history in either Source Control navigator or other git tools including the command line one, there is history and branches and all. Needless to say it worked perfectly before. Also for few files from the same project and repository there is an option to select previous commits to compare with.

I did my Google research with not much of a luck. Some solutions offer some voodoo over running external git tools to commit and hope for the best to magically solve problems. Non of them worked for me.

I am sure there is a proper explanation for that and perhaps a fix. Maybe git indices went south? Any ideas?

I am using this version of Xcode on Catalina:
Version 12.4 (12D4e)

Replies

Did you solve this problem?

I had a similar problem when I update macOS from 10.15 to 11.5.2. Both use same Xcode is 12.4 and project file. The source control shows git logs and differences, but main editor (Code review) doesn't show the differences while the 'M' is marked at the file. The right editor window (Code review) shows the "Unable to load revisions" error.

I copy the project folder from the previous volume which was macOS 10.15 is installed to the new volume. In the new volume macOS 11.5.2 and Xcode 12.4 are installed. Then the problem is gone.

I hope this helps someone see the same problem.