Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: File too large/exceeds 100MB, so I delete file, still get same error #189

Closed
ReaderGuy42 opened this issue Feb 24, 2022 · 7 comments

Comments

@ReaderGuy42
Copy link

Describe the bug

I put a PDF file with 123.46 MB in my vault because I was playing around with the beta plugin https://github.com/elias-sundqvist/obsidian-annotator which I could only get to work if the file was directly in the same folder as my note. That didn't work, so I deleted that, but now I'm getting error messages that Obsidian Git can't push because the file is too big. Thing is, both the folder and the file that it's telling me are the problem are no longer there at all. I also just emptied the system trash, but I don't think that did anything.

Relevant errors (if available)

Uncaught (in promise) Error: To [MY REPO]
!	refs/heads/main:refs/heads/main	[remote rejected] (pre-receive hook declined)
Pushing to [MY REPO]
remote: error: Trace: 006e879de6e7926645872ad11cc7c3dd2d6c18fe225ca56ad2c1b347e92d9b64        
remote: error: See http://git.io/iEPt8g for more information.        
remote: error: File Internship/Olly is 123.46 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.        
error: failed to push some refs to [MY REPO]
 at new GitError (eval at <anonymous> (app.js:1), <anonymous>:78:9)
    at Object.action (eval at <anonymous> (app.js:1), <anonymous>:2120:29)
    at PluginStore.exec (eval at <anonymous> (app.js:1), <anonymous>:2155:29)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:2594:43)
    at new Promise (<anonymous>)
    at GitExecutorChain.handleTaskData (eval at <anonymous> (app.js:1), <anonymous>:2592:16)
    at GitExecutorChain.eval (eval at <anonymous> (app.js:1), <anonymous>:2576:44)
    at Generator.next (<anonymous>)
VM171:15020 git obsidian message: Committed 14 files
VM171:15020 git obsidian message: Pulled 21 files from remote

Steps to reproduce

Have big file in vault. Delete file. Still have error that Git can't push because file is too big.

Expected Behavior

Error should disappear once the problem file is gone?

Addition context

No response

Operating system

Linux

@ReaderGuy42
Copy link
Author

I tried using the terminal to clear the cache with git rm --cached -r Internship but that gives me this error:
fatal: pathspec 'Internship' did not match any files because that folder doesn't exist anymore.

But when I git add . and then git push it still tries uploading that file that's too big, but I can't find it anywhere?

@Vinzent03
Copy link
Owner

The file is too large for GitHub. I guess the file is already commited. That's why you can't push anymore and deleting doesn't help. You have to reset the commits containing the file.

@ReaderGuy42
Copy link
Author

ReaderGuy42 commented Feb 24, 2022

How do I do that? I cannot find that file or folder in my repo either, if that makes a difference.

@ReaderGuy42
Copy link
Author

I'm not entirely sure what happened, but I got it to work. I tried git pull and then Obsidian opened a work tree of conflict files. I manually rm-ed and add-ed them, and then tried to push again, and then it worked. Thanks :)

@Gewerd-Strauss
Copy link

I am encountering a comparable issue, however I cannot replicate whatever steps @ReaderGuy42 has taken to fix it. When executing git pull from nside obsidian, no conflict tree window is opened, and hence I cannot continue.

Could you elaborate?

@ReaderGuy42
Copy link
Author

Sorry, I can't remember what I did. I do this so rarely that I have to relearn it whenever there's a problem. Have you tried removing the whole git folder and re-adding it via git add . or something like that?

@ReaderGuy42
Copy link
Author

This still occurs sometimes. It just happened to me again, and I can't figure out what to do now. Also @Gewerd-Strauss seems to have the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants