Copy git-push to another computer or perform smaller incremental clicks?

I'm currently on vacation and doing some work committing and clicking on github. Our internet connection here is very poor (wireless point-to-point in the mountains) and very often falls.

I was able to click on github for about a week and a half, but over the last couple of days I have not been able to. I can make small changes to other repositories, but it's pretty big, I think, and I made the situation worse by adding more and more commits.

When I try to click (using git extensions under Windows), I get the following error:

c: \ Program Files (x86) \ Git \ bin \ git.exe click "origin" master: master Done FATAL ERROR: network error: software caused connection interruption fatal: sha1 file '' write error: Broken pipe fatal: remote end unexpectedly hung up the error: could not click on some links to git @ github.com: plenderj / myproject.git '

I see the activity of the outgoing network, and then it leaves, and after a while git complains. I probably tried to click about 10 or 15 times.

Is there a way to split what git is trying to load into smaller pieces, or can I create some diff file, apply them to my computer at home, and then download from there? In the worst case, I copy and paste the whole / src / folder onto the memory card and just do it from home, but I can't help but think that there is a better way. Any suggestions? :)

+4
source share
2 answers

Use git-format-patch to create a series of email-requested patches that you can apply with git-apply on the other end.

see man git-format-patch for more details.

To create patches for your changes since you pull ed from the wizard:

 git format-patch origin/master 

This creates a series of files that you can email or download.

If you have email installed for git on your computer, you can send it via email using

 git send-email 

If you have an email setup for git in the source, you can apply it directly using

 git am 
+3
source

You can also see your story, select a version somewhere on your master , and then say

 git push <remote> <revision>:tmp-branch 

This way you can manually increase the number of changes since git never copies the same object twice. The final git push <remote> master then update the master branch.


Another option is git bundle . You can create a file with your fuzzy commits by saying

 git bundle create my.bundle origin/master..master 

Then you can transfer this file using some reliable method (rsync?) And apply it to the remote repository using

 git pull /path/to/my.bundle master 
+3
source

Source: https://habr.com/ru/post/1388980/


All Articles