Git push takes forever

When I am trying to push to my remote git repository, but it is taking forever and nothing happens. I waited for so long, but push is never getting finished. My OS is Ubuntu 12.10. Thank you.


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.


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.