Why does git pull hang? Why does git pull hang? git git

Why does git pull hang?


You may need to remove unnecessary git objects such as dangling commits & blobs:

git fsck && git gc --prune=now

git-fsck : Verifies the connectivity and validity of the objects in the database
git-gc : Cleanup unnecessary files and optimize the local repository

You can refer here about dangling commits & blobs.


If you are pulling from a linux machine you may want to check this file:

/etc/ssh/ssh_config

To make sure you aren't setting your default SSH port to something other than 22. Some people get confused between that file and:

/etc/ssh/sshd_config

When they're setting up servers to a non-standard SSH port.


I am in Windows, and I solved the hang by closing the Visual Studio before doing the pull.