If you don't have all your work in a single commit, you can git push
your commits partially.
Using git log
you can "walk" you history, checking some commits and pushing them to your remote. Lets say:
$ git log --oneline master
$ git checkout abcabc123123 # 10th commit in history
$ git push origin HEAD:master
$ git checkout bcdef145325 # 30th commit in history
$ git push origin HEAD:master
And so on...
How many commits your step will have to be will be a try&failure task - it depends on your commits' size.
If you don't have any history, maybe you can make individual commits for each file/folder (I think it would be a good idea to associate by filesize), push
them as before told, and then squash all commits in a single one:
$ git checkout master
$ git reset acbacbad142 # hash of first commit
$ git commit --ammend
$ git push -f origin master
You rebase all your changes in a single commit with the reset
+ commit --ammend
, and then push -f
to rewrite the remote branch. Files (blob
s, in git terms) will already be uploaded (even the tree
will be), so it should not take big time.
As you are re-writing history, be sure no one clones/fetches from the remote in the time between you start making your short pushes and the time you push the squashed commit, to avoid conflicts.