[Github] Angry if a non-existent file is too big

We are moving from gitlab to github.
Most repositories are complete, but only one repository cannot push the master branch with the following error:

remote: error: GH001: Large files detected.You may want to try Git Large File Storage-https://git-lfs.github.com.
remote: error: Trace: 13f549fac33a5729c1caeff2e679ff87
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File css/.common.css.swp is 463.00 MB;this exceeds GitHub's file size limit of 100.00 MB

You can't find this swap file in gitbash or explorer.
Even if you check with the following command,

git ls-files --others --ignored --exclude-standard

Where is the actual state of this file? . .
I added it to the ignore file, but it has no effect.

  • Answer # 1


    GitHub specifies the maximum size of objects that can be added to the repository.
    As shown below, the hard limit is currently 100MB.
    Git repositories keep a snapshot of all the files that existed from the past to the present, so if there is a record of committing a huge file at some moment in the past, the repository can be placed on GitHub It will not be possible.

    In this case,git filter-branchcan solve the problem by modifying the history and erasing the fact that "a huge file has been committed in the past" .
    Since the entire history will be recreated, repository compatibility will be lost.
    Please check first because there is a lot of information on the net. Since it is a repository modification operation, if the procedure is incorrect, the history will be destroyed.

    If you can't do this, you may either discard the past history and recreate the repository with the current files and place it on GitHub, or give up on GitHub itself.
    In any case, it is impossible to push the current repository as it is.

  • Answer # 2

    If it is a hidden file

  • Answer # 3

    It seems to be under the css directory. It can be displayed withls -a
    I'm sure it was out of the net while editing with vim
    You can delete.swpif there is no problem with the existing source