问题描述
我正在将一个大文件推送到git,但是连接速度很慢.终止此推送(中间推送)并在连接状况更好时恢复它的最安全方法是什么?
I'm pushing a large file to git, but have a very slow connection. What is the safest way to terminate this push (mid-push), and resume it when I have a better connection?
推荐答案
杀死客户端(或任何其他方法)不会导致服务器上的数据损坏,如果这就是您所说的安全".在成功传输所有Blob之前,服务器不会更新任何内容,然后它会更新引用以指向新的Blob.
Killing the client ( or any other method) won't cause the data on the server to be corrupted, if that's what you mean by "safe". The server doesn't update anything until all the blobs are transferred successfully, then it updates the refs to point to the new blobs.
尽管Git没有任何设施来恢复中断的传输,所以当您连接速度更快时,您可能不得不再次传输大Blob.
Git doesn't have any facilities to resume an interrupted transfer though, so you'll probably have to transfer the big blob again when you have a faster connection.
这篇关于Git:停止git push的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!