'Source Control Tab on Vscode not working, stuck with clock symbol, nothing happens

I have been trying to push my changed code to GitHub repo via VScode, it works on GitHub desktop but Source Control tab on Vscode is showing clock symbol forever. Then I do it via GitHub desktop again, but Source Control clock symbol never disappers till I close the application and open it again. Does anybody have a solution as to why is it behaving like this?



Solution 1:[1]

I had the same problem. Somehow the tracked branch from vscode and the branch I checked out with git in the cli were different.

I could solve the issue by changing the branch in the UI of vscode by clicking on the branch and setting the correct one. I also restarted vscode.

enter image description here

Additionally: make sure you have excluded large folders with small files from git in your '.gitignore' file. E.g. This may happen when you haven't excluded your 'node_modules' folder from version control.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Sever van Snugg