Resuming git push

I am trying to do git push to a remote server for a large project. Is there a way after starting the download that if the connection is lost, I can resume the git push command and not start it all over again?

edit: I'm trying to click github

edit2: it seems like the way is to do this incrementally. Can someone give an example on how to do this when I have a complete repository already on my computer?

thanks

+4
source share
2 answers

Hacky workaround: push multiple intermediate commits so you don't push as many times each time. This, of course, will not save you if it is one huge fix that cannot push.

# develop, and end up wanting to push master git branch master-tmp <commit> git push origin master-tmp:master git branch -f master-tmp <a more recent commit> git push origin master-tmp:master # ...keep going until you've pushed everything you want 

There are two main ways to choose a commit:

  • master~15 , master~10 , master~5 (15, 10 and 5 are fixed before master )

  • Use gitk to manually find them; when you select a commit in history, SHA1 is automatically placed in the clipboard of the middle-click clip.

+4
source

rsync your directory .git / objects to the remote, then git push - it will work much faster.

+1
source

All Articles