0

I can't push feature/rental-map getting this error:

! [remote rejected] feature/rental-map -> feature/rental-map (pre-receive hook declined)
error: failed to push some refs to 'git@github.com:saeefahmed/bwm-ng.git'

How can I get past that error message?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
saeef ahmed
  • 711
  • 3
  • 9
  • 26
  • FYI, all the`.vs` folder should be ignored and so not committed. Update your not pushed history like @Vonc answer told you to do. – Philippe Aug 18 '18 at 13:04
  • 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 Aug 19 '18 at 20:25

1 Answers1

0

That is why, for instance, Heroku reminds us to ignore such large files

git rm -f db/*.sqlite3
echo '*.sqlite3' > .gitignore
git add .gitignore
git commit -m "ignored sqlite databases"

But, if that still does not work, then you need to remove the file from all commit: I would recommend BFG Repo-cleaner

java -jar bfg.jar --strip-blobs-bigger-than 100M some-big-repo.git
cd some-big-repo.git
git reflog expire --expire=now --all && git gc --prune=now --aggressive

And then git push --force, which is OK if you are the only one working on that repo.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250