Reputation: 188
I am working on a project with a GitHub repo. I've been able to "add *", "commit" and "push" everything without a problem in the last 3 months. Now I downloaded a dataset containing about 12 GB of data and I have created a new folder for it.
I made some minor changes to the file that was already in the repo (for 3 months) and did "add *", "commit" and "git push".
After counting and compressing the objects, Git Bash throws up this error:
GitHub Error: RPC failed; curl 92 http/2 stream 0 was not closed cleanly: CANCEL (err 8)
send-pack: unexpected disconnect while reading sideband packet
...
fatal: the remote end hung up unexpectedly
Everything up-to-date
This is happening probably while writing the objects.
I have tried the following:
After the latest attempt with all of the solutions mentioned above, this additional error was thrown after getting to 50% of writing the objects:
remote: fatal: pack exceeds maximum allowed size
A screenshot of the error on Git Bash
So, my question is: 1. Why is this happening? 2. How can I work around/solve this problem and successfully push my current workspace onto GitHub?
Upvotes: 7
Views: 23453
Reputation: 1389
Expanding on the answer from GMKHusssain, if you're still encountering the same error (as I was) when running the git fetch --unshallow
step, you can instead repeat the process while gradually increasing the depth, by instead running, for example
git fetch --depth 100
git fetch --depth 200
git fetch --depth 400
and so on, (adjusting the steps in each --depth change as needed) until you've properly pulled the whole history of the repo.
Upvotes: 0
Reputation: 4701
Following this step to clone the repo, it will solution this issue.
$ git clone http://github.com/large-project-repo.git --depth 1
$ cd large-project-repo
$ git fetch --unshallow
Upvotes: 6
Reputation: 301
1. Why is this happening?
2. How can I work around/solve this problem and successfully push my current workspace onto GitHub?
Upvotes: 4
Reputation: 188
I solved this problem by bypassing it with this tutorial:
https://githowto.com/removing_commits_from_a_branch
ATTENTION: Remember to make a copy of your code before proceeding. You can still go back since you aren't deleting commits but it's annoying when you have to follow the tutorial twice.
ALSO: The git hist command is an alias. This is the one I copied:
git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short"
LINK: https://gist.github.com/ecasilla/9669241
Upvotes: 4