I'm new to git and I'm using the egit plugin for Eclipse and I can't seen to find a answer for my question anywhere. I'm working in a project and when I try to push my commit is fails and says that one of my files is 300 MB and my repository only accepts files with 100 MB or less. This file isn't important and I can delete it. If I delete the file and make another commit it still gives me the error (I guess it is also pushing the old commit) Is there any way to edit my commit and delete the file on my unpushed commit? Thanks in advance.
Asked
Active
Viewed 88 times
1
-
If you delete the file, it's still in the git repo history. You'll have to [delete the commit](https://stackoverflow.com/questions/1338728/delete-commits-from-a-branch-in-git). You are probably using github; after doing that use [git lfs](https://git-lfs.github.com/) to add that file to GitHub. Consider not doing that if it's not strictly necessary: source control systems are for source. If it's a non-source file, it's better uploaded to "releases" or somewhere else. – jjmerelo Apr 28 '18 at 18:09
-
i don't lose my progress if I delete the commit? The code wont go back to the commit before the one I wat to delete? – Iago Duarte Apr 28 '18 at 19:50
-
Possible duplicate of [How to remove/delete a large file from commit history in Git repository?](https://stackoverflow.com/questions/2100907/how-to-remove-delete-a-large-file-from-commit-history-in-git-repository) – phd Apr 30 '18 at 17:47
-
Is similar but not the same. For what i saw while using the BFG Repo-Cleaner it will delete the file on all the commits, and despite the file not being important now, it was at some stage of the project. – Iago Duarte Apr 30 '18 at 19:17