I am developing a Java AWT application with Intellij IDE. After I git committed my code, I push to the repository:
me@mine-laptop myproject (master)$ git push origin master
Enumerating objects: 77, done.
Counting objects: 100% (77/77), done.
Delta compression using up to 4 threads
Compressing objects: 100% (58/58), done.
Writing objects: 100% (76/76), 114.51 MiB | 957.00 KiB/s, done.
Total 76 (delta 5), reused 1 (delta 0)
remote: Resolving deltas: 100% (5/5), done.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 41b3b658daba463dbc5ad37bce34f785
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File java_pid66619.hprof is 661.61 MB; this exceeds GitHub's file size limit of 100.00 MB
To github.com:myname/myproject.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@github.com:myname/myproject.git'
It complains that I have a large file java_pid66619.hprof
which fails the git push.
Then I added that file to my .gitignore
and push again but still the same error.
Then I run command ls -la
, I don't see that large file java_pid66619.hprof
. I know that large file is heap dump.
My questions:
- Why I don't see that file with
ls -al
but git sill complains it when push? - Why I git ignored it but git still complains it?
- How to get rid of this issue?