1 minute read

I will not explain the all detail why and how because I just do not know. I just post what fixed this on my case:

You have first to remove those files from your repo. Then remove them from the history by using git-filter-repo. Download the git-filter-repo.py, put it your path and use it like git filter-repo or as standalone with python3 git-filter-repo.py

For this you can first analyze your repos and check things out.

python3 git-filter-repo.py --analyze

It will write some files in .git\filter-repo\analysis and you can easily find problematic files in here:

In my case I find those file again in path-deleted-sizes.txt

=== Deleted paths by reverse accumulated size ===
Format: unpacked size, packed size, date deleted, path name(s)
   107151516  106712325 2022-12-22 files/Batch/FFmpeg/202212212131_ScreenCapture.mp4
    92785522   92413548 2022-12-22 files/Batch/FFmpeg/202212212235_ScreenCapture.mp4
    72096675   27407725 2022-11-18 files/srtm_37_04.tif
    12877654   12780899 2022-12-22 files/Batch/FFmpeg/202212212220_ScreenCapture.mp4

You need the correct fullpath of those files to run:

python3 C:\Users\doria\Downloads\git-filter-repo.py --path files/srtm_37_04.tif --invert-paths

You may need to force it with --force.

You will see that it is working with the files number decreasing. And finally push.

git push --set-upstream origin master --force

If you have a creditential error, you may have to run:

git remote add origin https://github.com/DGrv/dorian.gravier.github.io

Other usefull cmd to see the history :)

git log --graph --decorate --pretty=oneline --abbrev-commit --all --name-status