恢复 git 推送
我正在尝试对一个大项目进行 git 推送到远程服务器。 有没有什么办法,一旦上传开始,如果连接丢失,我可以恢复 git Push 命令,而不必重新开始?
编辑:我正在尝试推送到 github
edit2:所以看来要采取的方法是增量进行。有人可以举例说明当我的计算机上已有完整存储库时如何执行此操作吗?
谢谢
I am trying to do a git push to a remote server, for a big project.
Is there any way once the upload is started, that if the connection is lost, I can resume the git push command and not have to start all over again?
edit: I am trying to push to github
edit2: so it seems that the way to go is doing it incremental. Can somebody put an example on how to do that when I have the full repository already on my computer?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Hacky 解决方法:推送几个中间提交,这样你就不会每次都推送那么多。如果这是一个未能推动的巨大提交,这当然不会拯救你。
有两种主要方法可以选择要推送的提交:
master~15
、master~10
、master~5
(15、 10 次,以及master
之前的 5 次提交)使用
gitk
手动查找它们;当你在历史记录中选择一个提交时,SHA1会自动放入中键粘贴剪贴板中。Hacky workaround: push several intermediate commits, so that you're not pushing as much each time. This of course won't save you if it's a single enormous commit that's failing to push.
There are two primary ways to pick the commits to push:
master~15
,master~10
,master~5
(15, 10, and 5 commits beforemaster
)Use
gitk
to manually find them; when you select a commit in the history, the SHA1 is automatically put in the middle-click paste clipboard.rsync 你的 .git/objects 目录到远程,然后执行 git push - 它会快得多。
rsync your .git/objects directory to the remote, then do git push - it will go much faster.
增量 git 推送
incremental git push