【发布时间】:2019-04-01 08:45:35
【问题描述】:
这里是新的 git 用户。
我以前可以运行“git push”命令,但它突然停止工作。
$ git push origin master
Enumerating objects: 29, done.
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
error: failed to push some refs to 'https://<user_name>@bitbucket.org/<user_name>/<file_name>.git'
我已经为 Windows 更新了 Git
$ git --version
git version 2.19.1.windows.1
在添加、提交和推送之前我已经尝试过“git pull”
$ git pull
Already up to date.
我已经尝试过更大的缓冲区
$ git config http.postBuffer 100000000
我已经从我的项目中删除了一个大文件。不知道我还能做什么。
虽然我看到一些帖子包含我遇到的两个 git 错误之一(远程结束和推送 refs),但没有一个与我发生的事情完全相符,也没有解决我的问题。
提前致谢!
编辑: 我使用 Bitbucket,这个问题只发生在这台 Windows 机器上。在另一台运行 MacOS 的机器上没有问题。
如果有帮助,这是我在 Windows 机器上的 git 状态:
$ git status
On branch master
Your branch is ahead of 'origin/master' by 4 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
【问题讨论】:
-
你的 Git 提供者是什么?看起来遥控器有问题,这可能与您的本地设置没有任何关系,假设以前可以正常工作。
-
我使用 Bitbucket。刚刚测试了从另一台计算机(运行 mac)推送更新,它工作正常。问题是我在 Windows 机器上有一些我不能丢失的本地更改。