Git push takes forever

Try using the --verbose option to see what actually happens. Even if you did small changes, some internal things might cause git to push a lot more data.

Have a look at git gc. It cleans up your local repository and might speed up things, depending on you issue. Backup strongly advised.


I had the same problem. If you are using Bitbucket.org, I don't know why, but disabling IPV6 connection fixed the problem.


I have faced a similar issue using git bash. Using these commands helped.

git config --global core.preloadindex true  
git config --global core.fscache true 
git config --global gc.auto 256

https://blog.praveen.science/solution-to-git-bash-is-very-slow-in-windows/


Ensure you're using the right protocol.

Depending on how you have your local configurations set up, you might need to use https to connect. To do so, switch the protocol for the remote repository from the [email protected]:[user]/[repo] protocol to the https://github.com/[user]/[repo].git protocol.

Also, it's worth trying vice versa, if you're unable to use the https protocol. On older configurations, the older git@github user authentication will often allow you to connect as a fallback.

Tags:

Git

Ubuntu

Github