0

Two weeks ago I deleted a folder called prototype-design from my local repo and push the changes to my GitLab repo.
These days I wanted to clone my GitLab repo to GitHub so I created an empty repo in Github, then I typed the following command in my terminal:

git remote add github https://yourLogin@github.com/yourLogin/yourRepoName.git

And then to transfer all the data from the GitLab repo to the newly created I typed:

git push --mirror github

But I got the following error:

remote: error: File prototype-design/Landing Page.pdf is 189.93 MB; this exceeds GitHub's file size limit of 100.00 MB

This file was part of the deleted folder two weeks ago, but looks like somehow still exist somewhere. Could you tell me how to remove it completely, so the clonning command to run successfully.

  • You need to look at Git as a timeline when you delete a file it only gets deleted from then on. That means if you rollback a day before the file was deleted it's still there in the history. – Prav Dec 20 '20 at 16:01
  • 2
    Git doesn't store *files*. Git stores *commits* (which then store files). The `git push` command sends *commits*. You have some commits that lack a giant file, and some commits that have a giant file. You're sending *all* of these commits. You need to send fewer, or different, *commits*. Now that you know this, see, e.g., [this answer](https://stackoverflow.com/a/1338758/1256452). – torek Dec 20 '20 at 16:02

0 Answers0