Git repository does not show files, Stuck at Scanning workspace for Git repository

Cursor almost always Stuck at the git tab. I tried the same thing on VScode and it works. there seems to be some bug in Cursor which need fixing.