0

I'm trying to push a existing folder to Github. I used https://www.digitalocean.com/community/tutorials/how-to-push-an-existing-project-to-github

When I push, my enterprise Github has a file size limit that keeps throwing a hook. I've tried git reset, redoing everything and the top answer here nothing seems to remove the deleted file from the tracked changes.

JF4bes
  • 147
  • 1
  • 4
  • 12
  • I think you need more details here. But if you have a file that is too big for the repo, then you need to remove the file from every commit in the history before you'll be able to push. – TTT May 26 '22 at 17:41
  • 1
    This is also likely to be a dup. Does this answer your question? [How to remove/delete a large file from commit history in the Git repository?](https://stackoverflow.com/questions/2100907/how-to-remove-delete-a-large-file-from-commit-history-in-the-git-repository) Note, nowadays, [this answer about git-filter-repo](https://stackoverflow.com/a/61602985/184546) is usually the best choice. – TTT May 26 '22 at 18:34
  • Git stores every commit forever, and every commit stores every file. That means that deleting a file doesn't shrink the repository: the old commits that have the file are still there, still having the file. To "fix" this one does a history rewrite: one makes a new (incompatible!) repository with a *different history* (different set of commits) in which the large file was never stored. Once you've done the conversion (with filter-repo or whatever), don't mix the old and new repositories. – torek May 26 '22 at 19:25

1 Answers1

0

Have you already tried adding the file to .gitignore?

atechie
  • 1
  • 1