0

Updated: Still stuck

I ran into GitHub's file size limit on a log file. I've since corrected .gitignore so the log file which can get large is ignored. So I checked out the branches, removed the log files (git rm), and checked them back in (git amend). But the size limit is still in effect.

I'm on Windows 10. I can not find any shelf_tools_debug.log file in this directory in any of the branches I've checked out. Here's the error:

> git push -u origin more_condensed
remote: error: Trace: fdb1c7da70f9b5f5b67dde486e80c8c18d60c3b860dc79d4ca921f9607a1f402        
remote: error: See http://git.io/iEPt8g for more information.        
remote: error: File shelf_tools_debug.log is 121.36 MB; this exceeds GitHub's file size limit of 100.00 MB        
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.        
To https://github.com/MegMM/goodreads_group_shelf_tools.git
 ! [remote rejected] more_condensed -> more_condensed (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/MegMM/goodreads_group_shelf_tools.git'

For resources, I'm using Can't push to GitHub because of large file which I already deleted
and
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository. Here's what I've tried:

A. Using git-sizer gave me this output which I paired down:

...
[4]  82e98731969aa0de9d38ba32bec6eac8fd8f361c (9135a1de462354b816a8e955dad7488e235ff879:shelf_tools_debug.log)
[5]  d1f05de111dd7db1ea4a99b49f7c9897a0146bff (refs/heads/more_condensed^{tree})
[6]  fd5b1c436e247cbfa180f1817be0099b2569ba5f (9135a1de462354b816a8e955dad7488e235ff879^{tree})

B. Tried git reset on those commits and got these errors:

> git reset --soft fdb1c7da70f9b5f5b67dde486e80c8c18d60c3b860dc79d4ca921f9607a1f402
fatal: ambiguous argument 'fdb1c7da70f9b5f5b67dde486e80c8c18d60c3b860dc79d4ca921f9607a1f402': unknown revision or path not in the working tree.

> git reset --soft 9135a1de462354b816a8e955dad7488e235ff879        
> Get-ChildItem -Recurse *.log
>
// nothing turns up

> git reset --soft 82e98731969aa0de9d38ba32bec6eac8fd8f361c        
error: object 82e98731969aa0de9d38ba32bec6eac8fd8f361c is a blob, not a commit
fatal: Could not parse object '82e98731969aa0de9d38ba32bec6eac8fd8f361c'.
// not sure what this means or what to do with it

C. Tried to look manually through other commits but can't find anything there.

D. Tried bfg:

> java -jar C:\Users\megha\Downloads\bfg-1.14.0.jar -b 100M .git
Using repo : C:\MyProjects\gr_shelf_tools\.\.git

Scanning packfile for large blobs: 1669
Scanning packfile for large blobs completed in 92 ms.
Warning : no large blobs matching criteria found in packfiles - does the repo need to be packed?  

So I assume there's still some left over versions checked in or they're still in the history somewhere. I don't know what to do next.

Meghan M.
  • 129
  • 1
  • 13
  • Go up one directory when you run `bfg`, it's meant to be run from the parent directory of your repo (as in `java -jar ....bfg.jar -b 100M .\gr_shelf_tools`. I'm not familiar with `git-sizer`, but it's also unclear (to me) from that output if there are individual blobs over 100MB. – Zac Anger Jan 17 '23 at 03:39
  • Hmm, I can see why that's where it should have been run from now. I tried that. Same result. Maybe something else? – Meghan M. Jan 17 '23 at 04:26
  • Have you run `git gc` in the repo to ensure you have packfiles? And if so, if you run git-sizer with [`--names`](https://github.com/github/git-sizer/blob/master/git-sizer.go#L33), or `--json`, does it show blobs over 100MB? – Zac Anger Jan 17 '23 at 04:53
  • Doesn't github actually tell you the path to the file that is over the limit? – eftshift0 Jan 17 '23 at 05:46
  • I know the file name which show up at the bottom of the `git-sizer` output above: `shelf_tools_debug.log`. I'm just not sure how to get at the history entries and remove them from GitHub. I checked out the branches (before starting this post), deleted the file, checked the branches back in. But GitHub still thinks they're there. I'm stuck at that point. Thx – Meghan M. Jan 17 '23 at 06:37
  • the `git-sizer --names full` returns ` | Biggest objects | | | | * Blobs | | | | * Maximum size [1] | 121 MiB | ************ | [1] 82e98731969aa0de9d38ba32bec6eac8fd8f361c (9135a1de462354b816a8e955dad7488e235ff879:shelf_tools_debug.log)` – Meghan M. Jan 17 '23 at 06:40

0 Answers0