1

I've had the following issue for the past few days, and it's beginning to really annoy me.
I had a repository with code for one of my classes I was trying to upload to GitHub.

When I first tried, it detected that I had the course textbook, which was over 100 MB in there, which didn't allow me to push to the new repository.

After that, I proceeded to work in the directory, and one of my output files was too large. Today I tried tackling the issue again, and consulted this thread and the help pages, to which I was able to successfully remove both of the files, however, after I run the commit and push commands again, they still detect the files (which are completely deleted from my computer!)

Before this, I ran the command 'git reset HEAD~1'.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250

1 Answers1

1

That could means you are trying to push past commits (not just the latest one) with those large files, even though the last commit no longer includes any such files.

If that is the case, since git filter-branch is soon deprecated, consider newren/git-filter-repo to remove any large files from past commits, before pushing (or force pushing of that rewrites the content of past commits previously pushed).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks for the response! The issue is since I've yet to push to the repository, it's getting tricky to see what I committed in the past. I've tried using the git reset head command to go back on my commits, to which I can see that I've deleted the nodes in the latest commit, but is it possible it's going back even further to when I first added them? Do you have any suggestions for how I could use git filter-branch or git filter-repo to fix this? – Justin Stevens Dec 09 '19 at 05:27
  • @JustinStevens Yes: see the content base filtering section of https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html#EXAMPLES: Simply remove any large file from your past commits. – VonC Dec 09 '19 at 05:32