I have added a folder containing millions of files with git add and deleted them using git rm -r FolderPath. Then I commited git commit and the object folder size in .git reaches to more than 250mb. So when I try to push the repository, it literally doesn't do the job duo to large number of files.
I tried many ways like git add -u, git gc, git gc --prune=now --aggressive, etc. but non of them solved the problem.
Finally I deleted the object folder and everything messed up. So I can neither push or pull.
Anyone know a simple way to avoid these scenarios?