-1

For 2 days I've been trying to resolve a situation where I can't push an update to github due to the too-large-file thing (php_errors.log is 117.71 MB).

I don't know why github accepted it ever in the first place.

I finally got so desperate I decided to destroy my github repo and create a new empty repo from scratch, this time using their suggested .gitignore file.

At some point I had to restore my entire Linode server.

Now I still cannot push, get

remote: error: File php_errors.log is 117.71 MB; this exceeds GitHub's file size limit of 100.00 MB

I imagine this must be because when I restored my server, all the .git cached stuff returned.

I have followed two SO threads to resolve but with no luck. Sometimes the suggestions are obsolete.

I have nothing on github and really nothing to lose. How best to take my Wordpress (recovered from a Linode server restoration) and push it to github, ideally without any logs, cache, etc. ??

henryC
  • 65
  • 11
  • I doubt that you were able to push that file into github ever. Are you completely sure it's up in github? – eftshift0 Sep 02 '23 at 19:27
  • Anyway, the best thing you can do is **rewrite history** to get rid of the offending file in the branch history. Is your branch history a straight line (as in, it has no merge commits)? – eftshift0 Sep 02 '23 at 19:41
  • Just now seeing this as SO did not email me. At one point from github.com it wouldn't let me view the file. In any case, I have removed the file locally, then did 'touch php_errors.log'. The only thing in my new repo (again I destroyed the last repo) is .gitignore. So I really just want to get the new repo pushed to github.com, without all the cache, the logs, all the unnecessary garbage. – henryC Sep 02 '23 at 22:27

1 Answers1

-1

I managed to get a new repo I can deal with.

  1. I created a brand new git repo on github.
  2. I used the Wordpress .gitignore template
  3. The gitignore apparently only commits wp-content, but I think that's fine. In the past I had just committed everything because that seemed safest, but as long as I don't lose my assets and such, this will do.
henryC
  • 65
  • 11