git push hangs after Total line

2019-01-23 10:18发布

My git push is hanging after appearing to complete the push. I am going git push

Counting objects: 51, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (47/47), done.
Writing objects: 100% (47/47), 27.64 MiB | 6.47 MiB/s, done.
Total 47 (delta 4), reused 0 (delta 0)

It hangs here and I have to control-c to get back to command line. I have made several commits in the past with this project with now issues. I have tried other repos on my machine and they work fine. What is going on here?

标签: git bitbucket
11条回答
可以哭但决不认输i
2楼-- · 2019-01-23 10:40

The problem is that the upload file is big.

Either you wait it out or go to your project folder and delete all the libraries which you could find in the target folder if using maven. Then do the push and it will happen quickly.

Anyways, the library folders need not be stored in git, it's just a waste of git space unless and until they are not available in the maven repositories and you really need to store them

查看更多
对你真心纯属浪费
3楼-- · 2019-01-23 10:40

See if you have staged, but not committed changes. (git status)

If so, commit (or unstage) those and then try to push. Worked for me.

查看更多
时光不老,我们不散
4楼-- · 2019-01-23 10:41

In my case, the remote had a full disk. Removing some files on the remote promptly fixed the issue.

查看更多
Emotional °昔
5楼-- · 2019-01-23 10:41

Checkout the user rights that git is using!

In my case I tried through ssh and the used system user was unable to write into the git bare repository...

Here is how you can debug your ssh connection

查看更多
爷、活的狠高调
6楼-- · 2019-01-23 10:41

Permissions can also be cause of this in the case of a bare repo on a remote machine.

查看更多
Juvenile、少年°
7楼-- · 2019-01-23 10:43

It can be (as the accepted answer suggests) just a moment to wait, but in the majority of cases it is linked to permissions on the remote. While mostly a non-issue on public git services as GitHub and Bitbucket, self-hosted remotes might have a special user, or a group for access.

And on new bare repositories it doesn't suffice to change the folder, but instead needs to be recursive because of .git-Folder inside.

查看更多
登录 后发表回答