Added a large file to local and now I can not push #145940
Replies: 2 comments
-
|
Use GitHub Desktop For Uplaoding Larger Files Also you need stable Internet Connection |
Beta Was this translation helpful? Give feedback.
-
|
You can explore: https://rtyley.github.io/bfg-repo-cleaner/ -- Steps to Remove the File Before Pushing1. Remove the File from Git's TrackingUse git rm --cached <file-path>
2. Add the Removal to a New CommitCreate a new commit to register the file’s removal in Git. git commit -m "Remove large file from tracking"3. Push the ChangesNow you can push your branch to the remote repository. git push origin <branch-name>This will successfully push your changes without including the large file in the remote history.
echo "<file-path>" >> .gitignore
git add .gitignore
git commit -m "Add file to .gitignore"
git push origin <branch-name> |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
3 days ago I stupidly added a 215MB file to my project and included it into the VCS.
Unfortunately I made numerous other changes and tried deleting the file/directory a number of times. I also updated after deleting and the file/directory reappeared.
It was pushed to GitHub. Where I saw it in its original size.
I have since tried to delete it and push I keep getting push failures saying it is larger than the limit of 100MB.
I do not see it in my local repo but I guess it is trying to push a prior commit where I added it. (how it ever got to GitHub I do not understand but …).
I just want to get it removed from everyplace and go on with my project.
Any suggestions would be appreciated.
I did not want to clutter up the above with all my attempts to correct this situation. I tried increasing the buffer and installing LFS (and migrating the existing file to LFS)
and at least that got rid of the RPC failed the remote hung up unexpectantly.
I also tried to go to githup and edit the file down to a few bytes but to no avail.
So I am stuck.
I saw a suggestion to clone the project but I would only want to do that as a last resort (would that even work?).
Finally, As I mentioned I increase the post buffer - how do I set it back to default size? (I assume I should???).
Thanks
PS I am working through GoLand on a windows 11 machine
Beta Was this translation helpful? Give feedback.
All reactions