【发布时间】:2017-02-15 00:40:23
【问题描述】:
我正在将具有超过 10000 次提交的现有 SVN 存储库(仅主干)迁移到托管 Git 解决方案(在我的情况下为 BitBucket)。
将 SVN 存储库转换为本地 Git 没问题,但现在我想将所有修订推送到在线的空 Git 存储库中。
但是从 TortoiseGit 进行推送时,它会以以下输出停止:
git.exe push -v --progress "origin" master
Counting objects: 198817, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (83858/83858), done.
POST git-receive-pack (chunked)
Writing objects: 100% (198817/198817), 1.54 GiB | 460.00 KiB/s, done.
Total 198817 (delta 130510), reused 178506 (delta 112822)
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
error: RPC failed; curl 52 Empty reply from server
Pushing to https://__removed__@bitbucket.org/__removed__/__removed__.git
Everything up-to-date
git did not exit cleanly (exit code 1) (3644609 ms @ 06.10.2016 11:16:23)
我认为我的问题的唯一解决方案是一次只推送 1000 个提交。但是如何限制服务器上尚未提交的前 1000 个提交?
我不想指定要推送的每个提交(例如在this question answered 中)。我只是想设置一个最大计数。
【问题讨论】:
-
“我认为我的问题的唯一解决方案是一次只推送 1000 个提交” - 你为什么这么认为?
-
我认为我的推动力太大了。我想尝试将其缓冲为较小的部分。
-
我不太确定问题出在哪里,但它很容易测试:在
master上的一长串提交开始附近选择一个提交,然后手动推送那个(这当然也会推动它的祖先提交),git push <remote> <hashid>:master。如何从一些烦人的 GUI 中做到这一点(与烦人的命令行相比 :-)),我不知道。 -
你能从 HTTPS 切换到 SSH 吗?