Git push挂起导致互联网问题

时间:2015-07-01 08:53:09

标签: git github

场景是这样的:

我已经同步了android源代码(aosp)。我想在我的存储库中创建它的“分叉”。但由于我无法找到一种方法来分叉一个特定的分支而不是整个仓库,我决定手动推送它。为此,我在github上创建了一个新的裸存储库。

我的项目有两个遥控器:

* aosp = https://android.googlesource.com/path_to_project.git
#The default remote using which I synced repo

* upstream = https://github.com/<my github user-name>/<newly created repo name>.git
#The remote I added manually

我尝试按以下方法推送它:

#First added remote to that bare repository
git remote add upstream https://github.com/<my github user-name>/<newly created repo name>.git

#This is the branch for which I want to fork that project
git checkout -b kitkat-mr2.2-release

#I want the branch to be named kitkat in my own repo
git push -u upstream kitkat-mr2.2-release:kitkat

输出如下:

Counting objects: 869653, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (200676/200676), done.
Writing objects: 100% (869653/869653), 1.23 GiB | 101.65 MiB/s, done
Total 869653 (delta 582065), reused 867347 (delta 581182)

然后它仍然存在。一个小小的网络搜索告诉我它应该如此,所以我认为它是正常的。但过了一段时间,我的整个互联网都停止了工作。系统监视器仍然显示正常的上传速度等,但我无法使用互联网。它开始在每个/任何网页上给我这个:

enter image description here

即使我使用wifi在手机上打开的任何网页都会产生相同的结果。我必须重新启动调制解调器以解决此错误/错误。

我还尝试在git config http.postBuffer 1825361101之前使用git push(再次,网络搜索的结果),但它也没有帮助。

请帮我解决这个问题。我对github相当新,仍然试图解决很多问题。感谢。

1 个答案:

答案 0 :(得分:2)

随着对问题的进一步研究,我发现这个解决方案似乎有效:

git config --global sendpack.sideband false

现在git push工作正常。