There is a mistakenly committed file in our git repository. Firstly, I've found which file causes this by running the following command from the How to find/identify large files/commits in Git history?
$ git rev-list --objects --all \
> | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
> | awk '/^blob/ {print substr($0,6)}' \
> | cut --complement --characters=13-40 \
| sort --numeric-sort --key=2 \
> | cut --complement --characters=13-40 \
> | numfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
Which results 6b82d8f18acd 716MiB MSSender/DebContainer.tar.tgz
Then, I used git filter-branch --tree-filter "rm -f DebContainer.tar.tgz" HEAD --all
command from https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#The-Nuclear-Option:-filter-branch to delete this file in all branches. While processing it creates a gitrewrite folder and creates .git folder back with the same size? What am I possibly doing wrong? Thank you.