1

I tried to use terminal to push a folder with images to Github but it stuck after total each time just as below.

Counting objects: 203, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (176/176), done.
Writing objects: 100% (203/203), 22.12 MiB | 15.70 MiB/s, done.
Total 203 (delta 23), reused 0 (delta 0)

Then I tried to use Github Desktop to sync the commit to Github but it reminds me of fatal: unable to access 'https://github.com/[name]/[repo]': Failed to connect to github.com port 443: Operation timed out (128). I thought it is all because of the size of files and I try to push only one image(size 50KB) to Github. However, it still doesn't work and stuck at the same situation. So how can I upload or push a folder with images quickly to my Github remote repo???

Coding_Rabbit
  • 1,287
  • 3
  • 22
  • 44

1 Answers1

0

First, as mentioned here, make sure the push is actually frozen. It might simply take longer than usual.

Second, you can indeed add, commit and push picture after picture (preferably with a script)
You also could have a local network configuration issue (unrelated to Git)

Third, make sure to use the latest release from Git (which GitHub Desktop does not; the latest one 82770ca uses git version 2.9.0.windows.1 from last June), which has more precise progress indicators when pushing (actually, it will be in Git 2.10, which should be released in two weeks).
And set your buffersize accordingly.

Finally, for really large binaries (or large number of them), you could also consider GitHub LFS.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks for your detailed answer. The thing is when I try to push only one image it still doesn't work but when I push multi files(`.css` and `.html`) it works fine. So I think there's nothing wrong with the internet. – Coding_Rabbit Aug 18 '16 at 06:52
  • @Coding_Rabbit What OS are you on? What Git version are you using? – VonC Aug 18 '16 at 06:55
  • It's `OS X Yosemite` and my git version is `git version 2.5.4 (Apple Git-61)` – Coding_Rabbit Aug 18 '16 at 07:01
  • @Coding_Rabbit It would be interesting to check if the issue persists with Git 2.9.3 – VonC Aug 18 '16 at 07:02