Git: Stop git push

前端 未结 3 918
梦谈多话
梦谈多话 2021-02-01 14:59

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?

3条回答
  •  北恋
    北恋 (楼主)
    2021-02-01 15:46

    Killing the client (Ctrl+C 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 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.

提交回复
热议问题